How to exclude directory from password protected directory in Apache

I had a problem lately with password protected directory using Apache2 mod_auth. I had to serve one directory inside of password protected directory without any restrictions.

This is how to set it up in Apache2:


<Directory />
        Options Indexes FollowSymLinks Includes
        AuthType Basic
        AuthName "Restricted area"
        AuthUserFile /home/artur/.apache_users
        require valid-user
        AllowOverride AuthConfig
</Directory>

So now if you want to allow unrestricted access to passfree in root dir of web server just add this:


<Location "/passfree">
        Satisfy Any
</Location>

Simple eh?!

Share on TwitterShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit
  • deeonline

    Didn’t work for me. Still getting password prompt.

    • Guest

      works for me, needs some space between location and “/passfree”