2

How to password protect VirtualHost directive w/o htaccess

view story
linux-howto

http://serverfault.com – I would like to password protect port 2000 of a web server by embedding a directive inside of the directive of the apache config file. However it didn't prompt for a password as expected. This is what I had in the apache config file: <VirtualHost *:2000> ServerName www.server.com ServerAdmin email DocumentRoot /var/www/html ErrorLog logs/server.com-error_log <Location / > AuthType Basic AuthName "TAP Surveillance" AuthUserFile /var/www/s2/.htpasswd-users Require valid-user </Location> </VirtualHost> (HowTos)