Skip to content

Instantly share code, notes, and snippets.

@Siedrix
Created February 20, 2016 23:07
Show Gist options
  • Save Siedrix/c278c8019d1db33ce262 to your computer and use it in GitHub Desktop.
Save Siedrix/c278c8019d1db33ce262 to your computer and use it in GitHub Desktop.
nginx-sample
upstream siedrixServer {
server localhost:4000;
}
server {
listen 80;
server_name siedrix.com;
root /home/ubuntu/siedrix;
access_log /var/log/nginx/siedrix.access.log;
error_log /var/log/nginx/siedrix.error.log;
client_max_body_size 0;
try_files $uri @siedrixServer;
location @siedrixServer {
client_max_body_size 0;
proxy_pass http://siedrixServer;
proxy_redirect off;
proxy_read_timeout 5m;
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_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment