Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. cd ~
  2. chmod 750 .
  3.  
  4. AllowOverride AuthConfig
  5.  
  6. AllowOverride All
  7.  
  8. sudo mkdir -p /usr/local/etc/apache/
  9. sudo htpasswd -c /usr/local/etc/apache/passwords my_username
  10.  
  11. sudo vim /var/www/.htaccess
  12.  
  13. AuthType Basic
  14. AuthName "My Web App"
  15. AuthUserFile /usr/local/etc/apache/passwords
  16. Require user my_username
  17.  
  18. sudo chown www-data /var/www/.htaccess
  19. sudo chmod 400 /var/www/.htaccess
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement