Created
August 3, 2013 16:41
-
-
Save papucho/6147073 to your computer and use it in GitHub Desktop.
Revisions
-
papucho created this gist
Aug 3, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ upstream my_app { server unix:///tmp/my_app.sock; } server { listen *:80; server_name my_app.com; access_log /var/log/nginx/my_app-access.log; location /favicon.ico { root /var/www/my_app/public/assets/favicon.ico; gzip_static on; expires max; add_header Cache-Control public; } location / { root /var/www/my_app/public; try_files $uri @app; gzip_static on; expires max; add_header Cache-Control public; } location @app { proxy_pass http://my_app; 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 https; proxy_set_header Host $http_host; proxy_redirect off; proxy_next_upstream error timeout invalid_header http_502; } }