Today, after completing the installation of Nagios, I can’t log in, with the following error message
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@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.
So look at the first shutdown log file, the relevant error logs can be viewed in Apache
vi /var/log/httpd/error_log
or
vi /usr/localapache/logs/error_log
Log prompts are validation errors,
nagios could not open password file :/usr/local/nagios/etc/htpasswd
Unable to open the htpasswd file, go to the directory to check
cd /usr/local/nagios/etc/htpasswd
The original actual file is htpasswd.users, missing users
Finally, enter the Apache to modify the httpd.cof file. In the AuthenUserFile, you should fill in the following address
/usr/local/nagios/etc/htpasswd.users
Finally, restart Apache,Nagios, verify login, OK, a little thought, or as the old saying goes, be careful to make a million years ship!
In addition, several other troubleshooting methods that cannot be logged in are provided:
1.
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
The default password file permissions generated under root are root, and be sure to change to user Nagios
chown -R nagios.nagios /usr/local/nagios/etc/htpasswd.users
2. Change the setting of selinux =disabled in the /etc/selinux/config file
3. Add the verified
after httpd.conf
#setting for nagios ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin" <Directory "/usr/local/nagios/sbin"> AuthType Basic Options ExecCGI AllowOverride None Order allow,deny Allow from all AuthName "Nagios Access" AuthUserFile /usr/local/nagios/etc/htpasswd //File for authentication for this directory access Require valid-user </Directory> Alias /nagios "/usr/local/nagios/share" <Directory "/usr/local/nagios/share"> AuthType Basic Options None AllowOverride None AuthName "Nagios Access" AuthUserFile /usr/local/nagios/etc/htpasswd //File for authentication for this directory access Require valid-user </Directory> Alias /nagios "/usr/local/nagios/share" <Directory "/usr/local/nagios/share"> AuthType Basic Options None AllowOverride None Order allow,deny Allow from all AuthName "nagios Access" AuthUserFile /usr/local/nagios/etc/htpasswd Require valid-user </Directory>
Htpasswd useful htpasswd. Users,Apache default validation file is htpasswd.users, with other filenames need to be defined
5./usr/local/nagios/etc/cgi. The CFG whether the user to set the password in the account of the account
Read More:
- summary of configuration and deployment of uwsgi+nginx+flag in centos7 and why internal server error is prompted [official instructions]
- [Solved] Web server failed to start. Port 8080 was already in use.
- Linux Error: Failed to connect to ::1: No route to the host
- Install and start the tftp-server server and possible solutions to Redirecting to /bin/systemctl restart xinetd.service problems
- How to set fixed IP address for Raspberry Pie
- Configure the node environment under Linux, internal/modules/cjs/loader.js:583 throw err; solution
- [Solved] Clone Linux Code Error: server certificate verification failed. CAfile: none CRLfile: none
- PM2 user defined Log, PID and other Log File Locations
- [Solved] Linux — 9 — txt files are copied from windows to Linux and read error
- Linux: How to Solve sudo operate Error
- Solution of device eth0 does not see to be present, delaying initialization. Error in network card under Linux
- Linux system service command error: Failed to allocate directory watch: Too many open files
- [Solved] Xshelln Connect to Local VM linux Error: Could not connect to ‘XXX.168.122.1‘ (port 22): Connection failed
- Grep: How to Find All the Files Containing a String in Linux
- How to Create Threads in Linux
- [Solved] Go use zoom to connect DM database and start reporting error in Linux
- [Solved] Ubuntu 20.04.3 Fail to Start sshd Error: Failed to start OpenBSD Secure Shell server
- [Solved] Linux Error: Failed to start bean ‘webServerStartStop‘; nested exception is org.springframework.
- [Solved] KingbaseES V8R3 Error: cluster.log ERROR: md5 authentication failed
- [Solved] Linux SSH Login Terminal Error: shell request failed on channel 0