Skip to content

Instantly share code, notes, and snippets.

@rtablada
Created January 30, 2014 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtablada/8702844 to your computer and use it in GitHub Desktop.
Save rtablada/8702844 to your computer and use it in GitHub Desktop.
A provisioning script for setting up nginx for an existing Laravel project with Vapobrash
#!/usr/bin/env bash
echo ">>> Updating Nginx"
# Chech that Nginx is installed
nginx -v > /dev/null 2>&1
NGINX_IS_INSTALLED=$?
if [ $NGINX_IS_INSTALLED -eq 0 ]; then
# Change default vhost created
sed -i "s/root \/vagrant/root \/vagrant\/public/" /etc/nginx/sites-available/vagrant
sudo service nginx restart
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment