Created
February 26, 2014 18:32
-
-
Save johannez/7e6cf93f68f96f79afdf to your computer and use it in GitHub Desktop.
Administration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add a user | |
adduser USERNAME | |
# Set primary group | |
usermod -g www-data USERNAME | |
# Create ssh key | |
ssh-keygen -t rsa -C "[email protected]" | |
# Create HTTP password protection | |
htpasswd -c .htpasswd USERNAME | |
AuthUserFile /var/www/vhosts/SITENAME/.htpasswd | |
AuthGroupFile /dev/null | |
AuthName "Development server" | |
AuthType Basic | |
<Limit GET> | |
require valid-user | |
</Limit> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment