Skip to content

Instantly share code, notes, and snippets.

@ryantbrown
Created March 26, 2015 05:57
Show Gist options
  • Save ryantbrown/d0444fbc3e36c0f96705 to your computer and use it in GitHub Desktop.
Save ryantbrown/d0444fbc3e36c0f96705 to your computer and use it in GitHub Desktop.
Vagrant / Rails / Nginx / Site Config
# create app file
sudo vim /etc/nginx/sites-available/appname
# insert server block in app file
server {
listen 80 default_server;
server_name www.mydomain.com;
passenger_enabled on;
passenger_app_env development;
root /vagrant/appname/public;
}
# link app file to enabled
sudo ln -s /etc/nginx/sites-available/appname /etc/nginx/sites-enabled/appname
# reload server
sudo nginx -s reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment