you're reading...

Apache – Digest Authentication

Here is the second one. In order to configure Digest authentication in Apache, the server that hosts Apache should be in a Domain that provides the user access for that machine. Here again there are two steps,

  1. Create a password file
  2. Configure the server

Create the password file:

To create the password file we would be using the htdigest executable instead of htpasswd

htdigest.exe -c <path to file> domain username


htdigest.exe -c .digest MyCompany sampleUser

Here again -c flag is used to create a password file.

Configure the Server

  1. Open the httpd.conf file found in the conf folder of Apache
  2. Uncomment the line LoadModule auth_digest_modules modules/mod_auth_digest.so
  3. Add the following code in the conf file
    <Directory "path to webroot for configuration">
    AuthType? Digest
    AuthName? "Domain Name"
    AuthDigestFile? "Path to the password file"
    Require vaild-user
  4. Save the conf file
  5. Restart Apache
  6. Digest Authentication is now set up on apache


No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: