Oliver Nassar

Basic Authentication on Apache

August 09, 2011

While I can't remember the exact steps for generate the auths file I list below (which contains the encrypted passwords), this post is meant to serve as a reminder of how to setup Basic authentication on an apache box.

<Directory "/var/www/stage.*">
    AuthType Basic
    AuthName "Authenticated Server"
    AuthUserFile /var/www/auths
    Require user fred
    ErrorDocument 401 :(
</Directory>

I'll post the step's for generating the auths file when I run into this requirement again, but wanted to write this post as I'm about to shutdown my slice, and had found this in my config.