Digest Authentication Setup
Difference Between Basic Authentication and Digest Authentication
Basic Authentication
- The user and password are sent to the server in plain text.
- If the communication is intercepted, the user / password can be read.
Digest Authentication
- The user / password are encrypted with MD5 before being sent over the wire.
For these reasons, Digest authentication is better from a security standpoint.
How to Set Up Digest Authentication (Apache)
- Configure the Digest authentication file
1 | $ htdigest -c "/var/www/.htpasswd" "Digest_Auth" <user_name> |
- /etc/httpd/conf.d/vhost.conf
1 | <VirtualHost *:80> |
Run a Syntax Check and Restart if There Are No Problems
1 | # httpd -t |
Verification
Actually access the ServerName you specified and
confirm that Digest authentication is configured.

That’s all.

