Apache uses the basic module validation, which is clear text transmission, is not too secure, so this article uses digest to verify, to improve Security.
1.Apache configuration:
A, Directory Permissions Configuration
Alias/nagios "/usr/local/nagios/share"
<directory "/usr/local/nagios/share" >
Options None
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
B, Authentication Configuration
<Location/nagios>
AuthType Digest
AuthName "Nagios Access"
Authdigestdomain/nagios Http://192.168.0.205/nagios
Authdigestprovider file
Authuserfile/usr/local/nagios/etc/nagios.users
Require Valid-user
</Location>
C, Authentication Module Configuration
See if there are any httpd.conf inside
LoadModule Auth_digest_module modules/mod_auth_digest.so and
LoadModule Auth_basic_module modules/mod_auth_basic.so
First make sure you have mod_auth_digest.so, this is not going to recompile apache.
Next make sure to comment out the mod_auth_basic.so line. Because Apache is certified with basic by default, if you do not annotate it, you will not succeed if you configure digest Authentication.
2. Create a password file
Htdigest-c/usr/local/nagios/etc/nagios.users "nagios Access" Nagiosadmin
There are several points to note in this command, and I have been testing it for a long time to find Out.
Nagios Access-----this explanation for the domain implementation is consistent with the AuthName in the authentication configuration, otherwise the authentication fails
3. Access
Enter Http://192.168.0.205/nagios in IE will pop-up window, prompt for user name and password
"go" Apache Digest authentication