In Apache, how do I set up password protection?

Posted by rphello101 on Server Fault See other posts from Server Fault or by rphello101
Published on 2012-12-06T01:15:55Z Indexed on 2012/12/06 5:07 UTC
Read the original article Hit count: 417

Filed under:
|

I'm attempting to set up a server using Apache. In the conf file, I inserted the code:

<Directory />
    Options FollowSymLinks
    AllowOverride AuthConfig
    AuthType Basic
    AuthName "Restricted Files"
    AuthBasicProvider file
    AuthUserFile C:\...\serverpass.txt
    Require user Admin
</Directory>

In order to try and get Apache to require a password. I created the username and password with htpasswd -c. When I got to localhost though, it doesn't prompt me for a username and password?

© Server Fault or respective owner

Related posts about apache2

Related posts about password