From 942c2f12c8f2914d68faebb198a6a6444027afb3 Mon Sep 17 00:00:00 2001 From: mguinness Date: Tue, 11 Aug 2020 16:03:45 -0700 Subject: [PATCH] Create aspnet.subdomain.conf.sample --- aspnet.subdomain.conf.sample | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 aspnet.subdomain.conf.sample diff --git a/aspnet.subdomain.conf.sample b/aspnet.subdomain.conf.sample new file mode 100644 index 0000000..e1f5537 --- /dev/null +++ b/aspnet.subdomain.conf.sample @@ -0,0 +1,26 @@ +# aspnet reverse proxy configuration for https to http on duckdns subdomain +# replace w/ duckdns subdomain & w/ http service name +# add environment variable ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" in docker + +server { + listen 443 ssl http2 default_server; + server_name _; + include /config/nginx/ssl.conf; + return 301 https://www.$host$request_uri; +} + +server { + listen 443 ssl http2; + server_name *..duckdns.org; + include /config/nginx/ssl.conf; + location / { + proxy_pass http://; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +}