Created
March 26, 2015 05:57
-
-
Save ryantbrown/d0444fbc3e36c0f96705 to your computer and use it in GitHub Desktop.
Vagrant / Rails / Nginx / Site Config
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
# 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