htaccess (Apache Authentication):


Sometimes we may face problem with our webmail when the spam mails generated from it changing the from ID and from server itself (127.0.0.1).

In that case we may enforce a authentication to access our webmail. Lets see how we can do it.

Step 1: Create a file:
vim /var/www/.htaccess


AuthType Basic
AuthName "Password Required"
AuthUserFile /var/www/webmail/.htpasswd
AuthGroupFile /dev/null
Require user test

Save and Exit.

Step 2: Create another file:
vim /var/www/webmail/.htpasswd

Save and exit.

Step 3: Edit the following file:
vim /etc/apache2/sites-available/default

Change AllowOverride None to AllowOverride All

Save and Exit.

Step 4: Now create the password:
htpasswd -m /var/www/webmail/.htpasswd test

New password:
Re-type new password:

Step 5: Now restart apache:
/etc/init.d/apache2 restart

Access your webmail address now

Comments

Popular posts from this blog

Squid Configuration

Squint Configure

Postfix SASL authentication with SMTP port 465:

How to Change the Logo from Zimbra Admin Console