Skip to content

Instantly share code, notes, and snippets.

@asimmon
Created February 9, 2016 01:54
Show Gist options
  • Save asimmon/ff6f86ac4fc18531e033 to your computer and use it in GitHub Desktop.
Save asimmon/ff6f86ac4fc18531e033 to your computer and use it in GitHub Desktop.
Nginx configuration for reverse proxying Kestrel
server {
# Port and domain
listen 80;
server_name aspnet.local;
# Path to the wwwroot folder
root /home/developer/projects/WebApplicationBasic/wwwroot;
# Static content
location ~ \.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm|woff2|svg)$ {
expires 1d;
access_log off;
add_header X-Static-File true;
}
# Pass requests to Kestrel
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Connection "";
proxy_http_version 1.1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment