Created
May 29, 2013 13:46
-
-
Save minakolta/5670357 to your computer and use it in GitHub Desktop.
Ruby on rails Nginx configuration
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
upstream roryourdomain { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; | |
server_name ror.yourdomain.com; | |
gzip on; | |
location / { | |
root /var/www/ror.yourdomain; | |
index index.html index.htm ; | |
proxy_redirect off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto http; | |
proxy_set_header Host $host; | |
proxy_pass http://roryourdomain; | |
try_files /system/maintenance.html $uri $uri/index.html $uri.html @ruby; | |
} | |
location @ruby { | |
proxy_pass http://roryourdomain; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment