View previous topic :: View next topic |
Author |
Message |
FcukThisGame l33t
Joined: 20 Apr 2005 Posts: 776 Location: /lost+found
|
Posted: Sun Jan 09, 2011 4:39 pm Post subject: [solved]Nagios on Apache2 opening, not running, CGI files |
|
|
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? _________________ 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
Last edited by FcukThisGame on Wed Jan 12, 2011 5:45 am; edited 1 time in total |
|
Back to top |
|
|
FcukThisGame l33t
Joined: 20 Apr 2005 Posts: 776 Location: /lost+found
|
Posted: Mon Jan 10, 2011 4:57 pm Post subject: |
|
|
Bump with info:
Code: |
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 |
|
Back to top |
|
|
magic919 Advocate
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Tue Jan 11, 2011 7:34 pm Post subject: |
|
|
Might be worth showing the part of the Apache vhost config where you define the Nagios stuff. |
|
Back to top |
|
|
FcukThisGame l33t
Joined: 20 Apr 2005 Posts: 776 Location: /lost+found
|
Posted: Tue Jan 11, 2011 9:01 pm Post subject: |
|
|
Code: | <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 |
|
Back to top |
|
|
FcukThisGame l33t
Joined: 20 Apr 2005 Posts: 776 Location: /lost+found
|
Posted: Wed Jan 12, 2011 5:45 am Post subject: |
|
|
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 |
|
Back to top |
|
|
magic919 Advocate
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Wed Jan 12, 2011 9:01 am Post subject: |
|
|
Now enjoy monitoring! |
|
Back to top |
|
|
libin0410 n00b
Joined: 03 Apr 2012 Posts: 1
|
Posted: Tue Apr 03, 2012 3:15 pm Post subject: |
|
|
can you tell me how to configure cgi.cfg ? |
|
Back to top |
|
|
magic919 Advocate
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Wed Apr 04, 2012 4:21 pm Post subject: |
|
|
You should see how when you start editing it. Start a new thread if you get stuck. |
|
Back to top |
|
|
|