Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd ~
- chmod 750 .
- AllowOverride AuthConfig
- AllowOverride All
- sudo mkdir -p /usr/local/etc/apache/
- sudo htpasswd -c /usr/local/etc/apache/passwords my_username
- sudo vim /var/www/.htaccess
- AuthType Basic
- AuthName "My Web App"
- AuthUserFile /usr/local/etc/apache/passwords
- Require user my_username
- sudo chown www-data /var/www/.htaccess
- sudo chmod 400 /var/www/.htaccess
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement