Hi all,
I've installed PNP4Nagios, but the "PNP4Nagios Environment Tests" page opens int the URL http://localhost/nagios and not in the
URL http://localhost/pnp4nagios/ I haven't the possibility to go to the home page of Nagios.
All is running well: Apache2 service, Nagios and Pnp4Nagios.
Have you any suggestion?
Thanks
Alessandro
localhost/nagios point to PNP4Nagios environment test
-
- Posts: 3
- Joined: Thu Apr 19, 2018 5:20 am
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: localhost/nagios point to PNP4Nagios environment test
Car you tar up everything in your /etc/httpd directory and attach to the post, I believe you may have a error in you httpd configurations.
-
- Posts: 3
- Joined: Thu Apr 19, 2018 5:20 am
Re: localhost/nagios point to PNP4Nagios environment test
Hi scottwilkerson,
following you can find these informations:
ls -al /etc/httpd/conf.d/
totale 16
drwxr-xr-x 2 root root 4096 apr 19 16:09 .
drwxr-xr-x 3 root root 4096 mar 15 18:00 ..
-rw-r--r-- 1 root root 1679 apr 19 16:09 nagios.conf
-rw-r--r-- 1 root root 922 apr 19 15:41 pnp4nagios.conf
pnp4nagios.conf:
nagios.conf
Thanks
Alessandro
following you can find these informations:
ls -al /etc/httpd/conf.d/
totale 16
drwxr-xr-x 2 root root 4096 apr 19 16:09 .
drwxr-xr-x 3 root root 4096 mar 15 18:00 ..
-rw-r--r-- 1 root root 1679 apr 19 16:09 nagios.conf
-rw-r--r-- 1 root root 922 apr 19 15:41 pnp4nagios.conf
pnp4nagios.conf:
Code: Select all
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
Alias /pnp4nagios "/usr/local/pnp4nagios/share"
<Directory "/usr/local/pnp4nagios/share">
AllowOverride None
Order allow,deny
Allow from all
#
# Use the same value as defined in nagios.conf
#
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On
Options symLinksIfOwnerMatch
# Installation directory
RewriteBase /pnp4nagios/
# Protect application and system files from being viewed
RewriteRule "^(?:application|modules|system)/" - [F]
# Allow any files or directories that exist to be displayed directly
RewriteCond "%{REQUEST_FILENAME}" !-f
RewriteCond "%{REQUEST_FILENAME}" !-d
# Rewrite all other URLs to index.php/URL
RewriteRule "^.*$" "index.php/$0" [PT]
</IfModule>
</Directory>
Code: Select all
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</IfVersion>
</Directory>
Thanks
Alessandro
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: localhost/nagios point to PNP4Nagios environment test
this looks correct, it sounds like you did something that overwrite the index.php in your nagios directory with the one that creates the "PNP4Nagios Environment Tests"
unzip the attached and place the index.php in /usr/local/nagios/share
This is from Nagios 4.2.4
unzip the attached and place the index.php in /usr/local/nagios/share
This is from Nagios 4.2.4
- Attachments
-
- index.zip
- (1.15 KiB) Downloaded 100 times
-
- Posts: 3
- Joined: Thu Apr 19, 2018 5:20 am
Re: localhost/nagios point to PNP4Nagios environment test
now the page works, but pnp4nagios no, but it does not do anything.
Thank you very much
Alessandro
Thank you very much
Alessandro
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: localhost/nagios point to PNP4Nagios environment test
Glad I could assist getting Nagios going, you'll need to reach out to the pnp4nagios people if you want to pursue getting it going.Alessandro71 wrote: now the page works, but pnp4nagios no, but it does not do anything.
Thank you very much
Alessandro