Authentication in Apache

Posted by & filed under Internet.

I wanted to restrict access to a directory on my web server. It’s quite easy by adding an Authentication directive in the site’s configuration file (in /etc/apache2/sites-available/; preferred) or in a .htaccess file in the directory itself. Create the user and password: htpasswd -c /path/to/my/specified/password/file user.name ## place file to a place that is not… Read more »