Skip to content

Instantly share code, notes, and snippets.

@Unitech
Last active August 29, 2015 13:58
Show Gist options
  • Save Unitech/10352445 to your computer and use it in GitHub Desktop.
Save Unitech/10352445 to your computer and use it in GitHub Desktop.
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nodelay on;
keepalive_timeout 2;
gzip on;
gzip_http_version 1.0;
gzip_comp_level 6;
gzip_vary on;
gzip_proxied any;
gzip_min_length 1000;
gzip_buffers 16 8k;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# Some version of IE 6 don't handle compression well on some mime-types, so just disable for them
gzip_disable "MSIE [1-6].(?!.*SV1)";
upstream fs {
server 127.0.0.1:3033;
keepalive 64;
}
server {
listen 80;
server_name fs.unitech.io www.fs.unitech.io app.canyouship.it www.app.canyouship.it;
keepalive_timeout 10;
location / {
root /var/www/FS2/current/packapp/enhancedapp/app;
autoindex on;
}
location /socket.io {
proxy_pass http://fs;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
location /api {
proxy_redirect off;
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 $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Connection "";
proxy_pass http://fs;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment