Created
August 21, 2014 03:13
-
-
Save rscarvalho/5028633c2b147ca75a83 to your computer and use it in GitHub Desktop.
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
upstream rails_app_server { | |
# Coloque a porta que o thin vai rodar - nao coloque ele pra rodar na porta 80! | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; | |
server_name seudominio; | |
keepalive_timeout 5; | |
# Location of our static files | |
root /path/para/app/rails/public; | |
error_page 500 502 503 504 /500.html; | |
error_page 404 /404.html; | |
# this rewrites all the requests to the maintenance.html | |
# page if it exists in the doc root. This is for capistrano's | |
# disable web task | |
try_files $document_root/system/maintenance.html $uri $uri.html $uri/index.html @app; | |
location @app { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://rails_app_server; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment