Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]Nagios on Apache2 opening, not running, CGI files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
FcukThisGame
l33t
l33t


Joined: 20 Apr 2005
Posts: 776
Location: /lost+found

PostPosted: Sun Jan 09, 2011 4:39 pm    Post subject: [solved]Nagios on Apache2 opening, not running, CGI files Reply with quote

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
View user's profile Send private message
FcukThisGame
l33t
l33t


Joined: 20 Apr 2005
Posts: 776
Location: /lost+found

PostPosted: Mon Jan 10, 2011 4:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Tue Jan 11, 2011 7:34 pm    Post subject: Reply with quote

Might be worth showing the part of the Apache vhost config where you define the Nagios stuff.
Back to top
View user's profile Send private message
FcukThisGame
l33t
l33t


Joined: 20 Apr 2005
Posts: 776
Location: /lost+found

PostPosted: Tue Jan 11, 2011 9:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
FcukThisGame
l33t
l33t


Joined: 20 Apr 2005
Posts: 776
Location: /lost+found

PostPosted: Wed Jan 12, 2011 5:45 am    Post subject: Reply with quote

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
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Wed Jan 12, 2011 9:01 am    Post subject: Reply with quote

Now enjoy monitoring!
Back to top
View user's profile Send private message
libin0410
n00b
n00b


Joined: 03 Apr 2012
Posts: 1

PostPosted: Tue Apr 03, 2012 3:15 pm    Post subject: Reply with quote

can you tell me how to configure cgi.cfg ?
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Wed Apr 04, 2012 4:21 pm    Post subject: Reply with quote

You should see how when you start editing it. Start a new thread if you get stuck.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum