Skip to content

Instantly share code, notes, and snippets.

@marshyski
Created May 22, 2016 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshyski/81f062c6bea3d1e8788d544d8a037175 to your computer and use it in GitHub Desktop.
Save marshyski/81f062c6bea3d1e8788d544d8a037175 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name 54.213.202.21;
location ~ /(.git|.svn|README.md) {
deny all;
log_not_found off;
access_log off;
return 404;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location / {
try_files $uri @service;
}
location @service {
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_buffering off;
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