Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[solved]Nagios on Apache2 opening, not running, CGI files

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
FcukThisGame
l33t
l33t
User avatar
Posts: 776
Joined: Wed Apr 20, 2005 10:01 pm
Location: /lost+found

[solved]Nagios on Apache2 opening, not running, CGI files

  • Quote

Post by FcukThisGame » Sun Jan 09, 2011 4:39 pm

I've been following the Gentoo nagios guide, but I'm having an issue with cgi files. When I click links in Nagios it tries to open the respective .cgi file, rather than running its code.

What do I need to do to make it run the code?
Last edited by FcukThisGame on Wed Jan 12, 2011 5:45 am, edited 1 time in total.
Sysadmin by trade, geek by choice

DESKTOP:
i7-3770K|8800GTS-512|32GB|1x256GB SSD|4x1TB|HD/BDROM|1920x1200+1680x1050
Win8 Pro w/ Hyper-V|Server 2012 VM|Ubuntu VM|Gentoo VM

TABLET: Samsung Ativ 700t
i5-3317U|4GB|128GB SSD|1920x1080 Touch
Win8
Top
FcukThisGame
l33t
l33t
User avatar
Posts: 776
Joined: Wed Apr 20, 2005 10:01 pm
Location: /lost+found

  • Quote

Post by FcukThisGame » Mon Jan 10, 2011 4:57 pm

Bump with info:

Code: Select all

gentoo ~ # confcat /etc/conf.d/apache2
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D PHP5 -D SUEXEC"
gentoo ~ # confcat /etc/apache2/httpd.conf
ServerRoot "/usr/lib/apache2"
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule dir_module modules/mod_dir.so
<IfDefine INFO>
LoadModule info_module modules/mod_info.so
</IfDefine>
LoadModule mime_module modules/mod_mime.so
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
<IfDefine USERDIR>
LoadModule userdir_module modules/mod_userdir.so
</IfDefine>
User apache
Group apache
Listen 80
NameVirtualHost *:80
Include /etc/apache2/modules.d/*.conf
Include /etc/apache2/vhosts.d/*.conf
I can post my vhosts if necessary... When accessing my.site/nagios it loads, but when i load a CGI page it just tries to download the file.
Sysadmin by trade, geek by choice

DESKTOP:
i7-3770K|8800GTS-512|32GB|1x256GB SSD|4x1TB|HD/BDROM|1920x1200+1680x1050
Win8 Pro w/ Hyper-V|Server 2012 VM|Ubuntu VM|Gentoo VM

TABLET: Samsung Ativ 700t
i5-3317U|4GB|128GB SSD|1920x1080 Touch
Win8
Top
magic919
Advocate
Advocate
Posts: 2182
Joined: Fri Jun 17, 2005 7:31 am
Location: Berkshire, UK

  • Quote

Post by magic919 » Tue Jan 11, 2011 7:34 pm

Might be worth showing the part of the Apache vhost config where you define the Nagios stuff.
Top
FcukThisGame
l33t
l33t
User avatar
Posts: 776
Joined: Wed Apr 20, 2005 10:01 pm
Location: /lost+found

  • Quote

Post by FcukThisGame » Tue Jan 11, 2011 9:01 pm

Code: Select all

<VirtualHost *:80>
       ServerName status.<myname>.org
       ServerAlias status.<myname>.org
       ServerAdmin <myemail>
       DocumentRoot "/var/www/<myname>.org/nagios"
        <Directory "/var/www/<myname>.org/nagios">
               Options Indexes FollowSymLinks
               AllowOverride All
               Options +ExecCGI
               Order allow,deny
               Allow from all
       </Directory>
       <Directory "/usr/lib/nagios/cgi-bin">
                Options Indexes FollowSymLinks
                AllowOverride All
                Options +ExecCGI
                Order allow,deny
                Allow from all
        </Directory>
        </VirtualHost>
Sysadmin by trade, geek by choice

DESKTOP:
i7-3770K|8800GTS-512|32GB|1x256GB SSD|4x1TB|HD/BDROM|1920x1200+1680x1050
Win8 Pro w/ Hyper-V|Server 2012 VM|Ubuntu VM|Gentoo VM

TABLET: Samsung Ativ 700t
i5-3317U|4GB|128GB SSD|1920x1080 Touch
Win8
Top
FcukThisGame
l33t
l33t
User avatar
Posts: 776
Joined: Wed Apr 20, 2005 10:01 pm
Location: /lost+found

  • Quote

Post by FcukThisGame » Wed Jan 12, 2011 5:45 am

Solved. cgi.cfg needed to be configured.
Sysadmin by trade, geek by choice

DESKTOP:
i7-3770K|8800GTS-512|32GB|1x256GB SSD|4x1TB|HD/BDROM|1920x1200+1680x1050
Win8 Pro w/ Hyper-V|Server 2012 VM|Ubuntu VM|Gentoo VM

TABLET: Samsung Ativ 700t
i5-3317U|4GB|128GB SSD|1920x1080 Touch
Win8
Top
magic919
Advocate
Advocate
Posts: 2182
Joined: Fri Jun 17, 2005 7:31 am
Location: Berkshire, UK

  • Quote

Post by magic919 » Wed Jan 12, 2011 9:01 am

Now enjoy monitoring!
Top
libin0410
n00b
n00b
Posts: 1
Joined: Tue Apr 03, 2012 3:01 pm

  • Quote

Post by libin0410 » Tue Apr 03, 2012 3:15 pm

can you tell me how to configure cgi.cfg ?
Top
magic919
Advocate
Advocate
Posts: 2182
Joined: Fri Jun 17, 2005 7:31 am
Location: Berkshire, UK

  • Quote

Post by magic919 » Wed Apr 04, 2012 4:21 pm

You should see how when you start editing it. Start a new thread if you get stuck.
Top
Post Reply

8 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic