Vhosts authentication fragments
By Lance Gliser
Published:
![Lance Gliser](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Flance-gliser.2d1d9486.jpg&w=256&q=75)
Heads up! This content is more than six months old. Take some time to verify everything still works as expected.
I know this is beyond simple, but sometimes it's nice to have a copy paste resource for setting up a vhost password protected site.
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /var/www/vhosts/{site}/security/.htpasswd
AuthGroupFile /dev/null
require valid-user