Skip to content

Instantly share code, notes, and snippets.

@ksloan
Created November 14, 2015 15:28
Show Gist options
  • Save ksloan/5596190778defc29b1c1 to your computer and use it in GitHub Desktop.
Save ksloan/5596190778defc29b1c1 to your computer and use it in GitHub Desktop.
Nginx proxy config that serves static files
server {
listen 80;
server_name ksloan.net;
root /home/kevin/app/public;
location / {
try_files $uri @backend;
}
location @backend {
proxy_pass http://127.0.0.1:8080;
access_log off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_hide_header X-Frame-Options;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment