Skip to content

Instantly share code, notes, and snippets.

@IceskYsl
Created April 22, 2014 05:00
Show Gist options
  • Save IceskYsl/11165796 to your computer and use it in GitHub Desktop.
Save IceskYsl/11165796 to your computer and use it in GitHub Desktop.
nginx conf for puma
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