500 Internal Server Error
Posted: Tue May 01, 2012 5:20 pm
I have hit another snag in my installation of Nagios 3.3.1 on a Linux Ubuntu server with an Intel base processor.
Apache is running, Nagios is running
Open web browers type https://localhost/nagios and I get the following:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything
you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.20 (Ubuntu) Server at localhost Port 80
Base on the reading articles on the this support forum it appears that this is permission issue. I checked the Apache error.log file and access was being denied to the "/usr/local/nagios/etc/htpasswd.users" file.
I attempted changed permission using the following:
chown nagios:nagios /usr/local/nagios/etc/htpasswd.user
chmod 755 /usr/local/nagios/etc/htpasswd.user
The the Apache error.log is as follows at this point in time:
root@Octoberfest:/# tail -f /var/log/apache2/error.log
[Tue May 01 14:29:55 2012] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 01 14:29:55 2012] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 01 14:30:19 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local /nagios/etc/htpasswd.users
[Tue May 01 15:33:17 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 15:42:52 2012] [error] [client 127.0.0.1] File does not exist: /var/www/nagios3
[Tue May 01 16:01:53 2012] [notice] caught SIGTERM, shutting down
[Tue May 01 16:01:54 2012] [notice] Apache/2.2.20 (Ubuntu) PHP/5.3.6-13ubuntu3.6 with Suhosin-Patch configured -- resuming normal operations
[Tue May 01 16:15:01 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 16:15:06 2012] [error] [client 127.0.0.1] File does not exist: /var/www/nagios3
[Tue May 01 16:15:13 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
I also have been looking at the installation guide here:
http://www.unixmen.com/install-nagios-u ... x-and-10x/
In this guide it states to edit the "apache.conf" file, which I have done per instructions.
Specifically:
sudo vi /etc/apache2/apache2.conf
and add this line
DirectoryIndex index.html index.php index.cgi
.....
sudo vi /etc/apache2/apache.conf
and add these lines :
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
Alias /nagios /usr/local/nagios/share
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
save and exit then restart apache2
Upon the restarting Apache I get the following messages:
root@Octoberfest:/# service apache2 restart
[Tue May 01 16:53:36 2012] [warn] The ScriptAlias directive in /etc/apache2/apache2.conf at line 236 will probably never match because it overlaps an earlier ScriptAlias.
Syntax error on line 238 of /etc/apache2/apache2.conf:
AllowOverride not allowed here
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
The Apache error.log file is as follows:
root@Octoberfest:/# tail -f /var/log/apache2/error.log
[Tue May 01 14:29:55 2012] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 01 14:29:55 2012] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 01 14:30:19 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 15:33:17 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 15:42:52 2012] [error] [client 127.0.0.1] File does not exist: /var/www/nagios3
[Tue May 01 16:01:53 2012] [notice] caught SIGTERM, shutting down
[Tue May 01 16:01:54 2012] [notice] Apache/2.2.20 (Ubuntu) PHP/5.3.6-13ubuntu3.6 with Suhosin-Patch configured -- resuming normal operations
[Tue May 01 16:15:01 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 16:15:06 2012] [error] [client 127.0.0.1] File does not exist: /var/www/nagios3
[Tue May 01 16:15:13 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
I realize I have provided alot of information here. I am new to Nagios, Apache, and Linux. I am reading before asking questions to gain some understanding. I am trying to figure out if this is an Apache issue or a Nagios issue.
I have tried several different things here, and I am not sure if they have helped me or mislead me.
Thank you in advance for any assistance, about this issue.
Apache is running, Nagios is running
Open web browers type https://localhost/nagios and I get the following:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything
you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.20 (Ubuntu) Server at localhost Port 80
Base on the reading articles on the this support forum it appears that this is permission issue. I checked the Apache error.log file and access was being denied to the "/usr/local/nagios/etc/htpasswd.users" file.
I attempted changed permission using the following:
chown nagios:nagios /usr/local/nagios/etc/htpasswd.user
chmod 755 /usr/local/nagios/etc/htpasswd.user
The the Apache error.log is as follows at this point in time:
root@Octoberfest:/# tail -f /var/log/apache2/error.log
[Tue May 01 14:29:55 2012] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 01 14:29:55 2012] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 01 14:30:19 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local /nagios/etc/htpasswd.users
[Tue May 01 15:33:17 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 15:42:52 2012] [error] [client 127.0.0.1] File does not exist: /var/www/nagios3
[Tue May 01 16:01:53 2012] [notice] caught SIGTERM, shutting down
[Tue May 01 16:01:54 2012] [notice] Apache/2.2.20 (Ubuntu) PHP/5.3.6-13ubuntu3.6 with Suhosin-Patch configured -- resuming normal operations
[Tue May 01 16:15:01 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 16:15:06 2012] [error] [client 127.0.0.1] File does not exist: /var/www/nagios3
[Tue May 01 16:15:13 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
I also have been looking at the installation guide here:
http://www.unixmen.com/install-nagios-u ... x-and-10x/
In this guide it states to edit the "apache.conf" file, which I have done per instructions.
Specifically:
sudo vi /etc/apache2/apache2.conf
and add this line
DirectoryIndex index.html index.php index.cgi
.....
sudo vi /etc/apache2/apache.conf
and add these lines :
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
Alias /nagios /usr/local/nagios/share
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
save and exit then restart apache2
Upon the restarting Apache I get the following messages:
root@Octoberfest:/# service apache2 restart
[Tue May 01 16:53:36 2012] [warn] The ScriptAlias directive in /etc/apache2/apache2.conf at line 236 will probably never match because it overlaps an earlier ScriptAlias.
Syntax error on line 238 of /etc/apache2/apache2.conf:
AllowOverride not allowed here
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
The Apache error.log file is as follows:
root@Octoberfest:/# tail -f /var/log/apache2/error.log
[Tue May 01 14:29:55 2012] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 01 14:29:55 2012] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 01 14:30:19 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 15:33:17 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 15:42:52 2012] [error] [client 127.0.0.1] File does not exist: /var/www/nagios3
[Tue May 01 16:01:53 2012] [notice] caught SIGTERM, shutting down
[Tue May 01 16:01:54 2012] [notice] Apache/2.2.20 (Ubuntu) PHP/5.3.6-13ubuntu3.6 with Suhosin-Patch configured -- resuming normal operations
[Tue May 01 16:15:01 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Tue May 01 16:15:06 2012] [error] [client 127.0.0.1] File does not exist: /var/www/nagios3
[Tue May 01 16:15:13 2012] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/htpasswd.users
I realize I have provided alot of information here. I am new to Nagios, Apache, and Linux. I am reading before asking questions to gain some understanding. I am trying to figure out if this is an Apache issue or a Nagios issue.
I have tried several different things here, and I am not sure if they have helped me or mislead me.
Thank you in advance for any assistance, about this issue.