Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions aspnet.subdomain.conf.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# aspnet reverse proxy configuration for https to http on duckdns subdomain
# replace <subdomain> w/ duckdns subdomain & <container> 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 *.<subdomain>.duckdns.org;
include /config/nginx/ssl.conf;
location / {
proxy_pass http://<container>;
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;
}
}