Skip to content

Instantly share code, notes, and snippets.

@jessecogollo
Created June 24, 2015 22:10
Show Gist options
  • Save jessecogollo/6321723597e5da33f50d to your computer and use it in GitHub Desktop.
Save jessecogollo/6321723597e5da33f50d to your computer and use it in GitHub Desktop.
configuration nginx
upstream bluff {
server 127.0.0.1:8080;#nodejs
}
server {
listen 80;//
server_name m.domanin.com www.m.domanin.com;
root /path/public/;
location / {
proxy_pass http://bluff/param1; # match the name of upstream directive which is defined above
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location ~* \.(jpg|jpeg|gif|png|ico|xml|svg|ttf|woff|eot|otf)\z {
access_log off;
log_not_found off;
# Per RFC2616 - 1 year maximum expiry
expires 1y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment