Skip to content

Instantly share code, notes, and snippets.

@AtsushiA
Last active November 21, 2015 11:50
Show Gist options
  • Save AtsushiA/ab1f62f142dbe590ada6 to your computer and use it in GitHub Desktop.
Save AtsushiA/ab1f62f142dbe590ada6 to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo /usr/sbin/usermod -s /bin/bash nginx
sudo /sbin/service monit stop
sudo /sbin/service nginx stop
sudo /sbin/service hhvm stop
sudo /usr/sbin/usermod -d /var/www/vhosts nginx
sudo /sbin/service hhvm start
sudo /sbin/service nginx start
sudo /sbin/service monit start
sudo mkdir /var/www/vhosts/.ssh
sudo cp /home/ec2-user/.ssh/authorized_keys /var/www/vhosts/.ssh/
sudo chown -R nginx:nginx /var/www/vhosts/.ssh/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment