mirror of
https://github.com/linuxserver/reverse-proxy-confs.git
synced 2025-08-21 22:03:39 -07:00
Create aspnet.subdomain.conf.sample
This commit is contained in:
parent
f0c93b278e
commit
942c2f12c8
1 changed files with 26 additions and 0 deletions
26
aspnet.subdomain.conf.sample
Normal file
26
aspnet.subdomain.conf.sample
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue