NOTES
How to apache basic authorization in virtual host
Create apache virtual host:
<VirtualHost 127.0.0.1:80> ServerName localhost ServerAdmin webmaster@localhost DocumentRoot /var/www/localhost <Directory /var/www/localhost> AllowOverride All AuthType basic AuthName "Localhost Authorization" AuthBasicProvider file AuthUserFile /var/www/localhost/.htpasswd Require valid-user </Directory> ErrorLog /var/log/apache2/localhost.error.log CustomLog /var/log/apache2/localhost.access.log combined </VirtualHost>
Create password file:
htpasswd -c /var/www/localhost/.htpasswd sender
Newer Post
Older Post
Home