I’ve been testing usage of apache authentication, following this example.
I’m using Ubuntu/Apache2.
Inside of my ‘site’, /etc/apache2/sites-enabled/playcat, which is pointing to /home/playcat/public_html, I entered following:
<Directory "/home/playcat/public_html/backend">
AuthType Basic
AuthName "Restricted Content"
AuthBasicProvider file
AuthUserFile /home/playcat/passwd/passwords
Require user playcat
</Directory>
Password for user playcat was created via
htpasswd -c /home/playcat/passwd/passwords playcat
Obviously, before that I created passwd folder :).
Now, when I open http://localhost/backend, I get promped for u/p combination. However, when I type it, I get 403 response.
Other than that, server is working a-ok. I have php and mysql installed, and everything works fine.
Did I miss smt?
Thx
p.s. I’m using correct user/pass combo 🙂
Try to change the
to
That is how it is supposed to be written according to the spec:
http://httpd.apache.org/docs/current/mod/core.html#directory
Here is an example that works for me: