Created
February 9, 2016 01:54
-
-
Save asimmon/ff6f86ac4fc18531e033 to your computer and use it in GitHub Desktop.
Nginx configuration for reverse proxying Kestrel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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