Last active
August 29, 2015 14:14
-
-
Save noppolp/d5c448d41c6ea42ea839 to your computer and use it in GitHub Desktop.
Add more one rails env to nginx
This file contains hidden or 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
| $ cp /etc/nginx/sites-available/default /etc/nginx/sites-available/staging | |
| $ ln -s /etc/nginx/sites-available/staging /etc/nginx/sites-enabled/staging | |
| $ nano /etc/nginx/sites-available/staging | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| root /home/deploy/myapp_staging/current/public; | |
| rails_env staging; | |
| passenger_enabled on; | |
| server_name staging.myapp.com; | |
| } | |
| $ service nginx restart | |
| # if it has some errors | |
| $ cat /var/log/nginx/error.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment