Another Linux Blag

Running Ubuntu as a Desktop and Server

Password Protect A Web Directory Using Ubuntu and Apache2

, , ,

I followed this guide(with apache2 already installed):

http://ag.arizona.edu/ecat/web/password-protect.html

and then had to do this:

https://help.ubuntu.com/community/EnablingUseOfApacheHtaccessFiles

---

To make .htaccess files work as expected, you need to edit /etc/apache2/sites-available/default. Look for a section that looks like this:

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>

You need to modify the line containing AllowOverride None to read AllowOverride All. This tells Apache that it's okay to allow .htaccess files to over-ride previous directives. You must reload Apache before this change will have an effect:

sudo /etc/init.d/apache2 reload

---

And now have a working password protected web directory.

Windows XP Password Prompt on a Samba Shared FolderHowto: Get a beautiful Conky 1.4.2 setup

Write a comment

New comments have been disabled for this post.