Last active
April 23, 2018 18:33
-
-
Save praveenc/03893da76bc7d341f9e299d4678524fb to your computer and use it in GitHub Desktop.
configure nginx as a reverse proxy to forward requests to ASP.NET Core app
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 { | |
| listen 443 ssl; | |
| ssl_certificate /etc/nginx/ssl/nginx.crt; | |
| ssl_certificate_key /etc/nginx/ssl/nginx.key; | |
| location / { | |
| proxy_pass http://localhost:5000; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection keep-alive; | |
| proxy_set_header Host $host; | |
| proxy_cache_bypass $http_upgrade; | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
REF: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.1&tabs=aspnetcore2x