Skip to content

Instantly share code, notes, and snippets.

@johannez
Created February 26, 2014 18:32
Show Gist options
  • Save johannez/7e6cf93f68f96f79afdf to your computer and use it in GitHub Desktop.
Save johannez/7e6cf93f68f96f79afdf to your computer and use it in GitHub Desktop.
Administration
# 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