Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # www.fduran.com
- # apache password protect directory
- # Apache config
- <Directory /home/user/public_html>
- AllowOverride AuthConfig
- # ...
- </Directory>
- Alias /protected "/home/user/public_html/protected"
- <Location "/protected/">
- SetHandler None
- Options -Indexes +FollowSymLinks
- allow from all
- </Location>
- # auth_* modules needed
- a2enmod auth_basic
- # passwd file, outside directory served
- htpasswd -c /home/user/.htpasswd myuser
- # /home/user/public_html/protected/.htaccess file
- AuthType Basic
- require user myuser
- AuthName 'Protected'
- AuthUserFile /home/user/.htpasswd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement