Created
April 22, 2014 05:00
-
-
Save IceskYsl/11165796 to your computer and use it in GitHub Desktop.
nginx conf for puma
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 redmine { | |
server unix:///var/run/redmine.sock; | |
} | |
server { | |
listen 80; | |
server_name work.eoemobile.com; # change to match your URL | |
root /datas/www/redmine/current/public; # I assume your app is located at this location | |
location / { | |
proxy_pass http://redmine; # match the name of upstream directive which is defined above | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
location ~* ^/assets/ { | |
# Per RFC2616 - 1 year maximum expiry | |
expires 1y; | |
add_header Cache-Control public; | |
# Some browsers still send conditional-GET requests if there's a | |
# Last-Modified header or an ETag header even if they haven't | |
# reached the expiry date sent in the Expires header. | |
add_header Last-Modified ""; | |
add_header ETag ""; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment