How To Protect a WordPress Site Using Basic Auth in Apache 2.4
erics, Posted August 25th, 2016 at 7:37:07am
Apache 2.4 changed the security configuration directives a bit.
Here is an example using basic auth:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<Directory "/path/to/your/wordpress"> AllowOverride All Options +FollowSymLinks +ExecCGI -Indexes Order allow,deny Allow from all <RequireAll> AuthType Basic AuthName "Protected Resource" AuthUserFile /path/to/your/.htpasswd Require valid-user </RequireAll> </Directory> |
What tripped me up for a while was that I still had the Require all granted
directive inside the
Leave Your Comment
All fields marked with "*" are required.