Last active
August 29, 2015 14:10
-
-
Save vincepri/c3f3e158ec54525bb75d to your computer and use it in GitHub Desktop.
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 app { | |
| server unix:/tmp/unicorn.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 3000; | |
| # Application root, as defined previously | |
| root /write_latex/app; | |
| access_log off; | |
| error_log off; | |
| try_files $uri/index.html @app; | |
| location ~ ^/assets/?(.*)$ { | |
| access_log off; | |
| error_log off; | |
| gzip_static on; | |
| root /write_latex/app/assets; | |
| try_files /javascripts/$1 /stylesheets/$1 /images/$1 /src/$1 @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://app; | |
| } | |
| error_page 500 502 503 504 /500.html; | |
| client_max_body_size 4G; | |
| keepalive_timeout 10; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment