Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Version 2018/04/20 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default
- # listening on port 80 disabled by default, remove the "#" signs to enable
- # redirect all traffic to https
- #server {
- # listen 80;
- # server_name _;
- # return 301 https://$host$request_uri;
- #}
- ################################################################################
- #### PORT 80 ACTIVE ############################################################
- # listening on port 80 disabled by default, remove the "#" signs to enable
- # redirect all traffic to https
- server {
- listen 80;
- server_name benita-*.duckdns.org;
- return 301 https://$host$request_uri;
- }
- ################################################################################
- ################################################################################
- # sample reverse proxy config without url base, but as a subdomain "cp", ip and port same as above
- # notice this is a new server block, you need a new server block for each subdomain
- #server {
- # listen 443 ssl;
- #
- # root /config/www;
- # index index.html index.htm index.php;
- #
- # server_name cp.*;
- #
- # include /config/nginx/ssl.conf;
- #
- # client_max_body_size 0;
- #
- # location / {
- # auth_basic "Restricted";
- # auth_basic_user_file /config/nginx/.htpasswd;
- # include /config/nginx/proxy.conf;
- # proxy_pass http://192.168.1.50:5050;
- # }
- #}
- ################################################################################
- ### SUBDOMAIN 1 ##################################################################
- #server {
- # listen 443 ssl;
- # root /config/www;
- # index index.html index.htm index.php;
- # server_name mydomain-hass.duckdns.org;
- # include /config/nginx/ssl.conf;
- # client_max_body_size 0;
- # location / {
- ## auth_basic "Restricted";
- ## auth_basic_user_file /config/nginx/.htpasswd;
- # include /config/nginx/proxy.conf;
- # proxy_pass http://hostip:5050;
- # }
- #}
- ### SUBDOMAIN 2 ###############################################################
- server {
- listen 443 ssl;
- root /config/www;
- index index.html index.htm index.php;
- server_name mydomain-mqtt.duckdns.org;
- include /config/nginx/ssl.conf;
- client_max_body_size 0;
- location / {
- # auth_basic "Restricted";
- # auth_basic_user_file /config/nginx/.htpasswd;
- include /config/nginx/proxy.conf;
- proxy_pass http://x.x.x.x:1883;
- }
- }
- ### HOMEASSISTANT ##############################################################
- server {
- listen 443 ssl;
- root /config/www;
- index index.html index.htm index.php;
- server_name benita-hass.duckdns.org;
- include /config/nginx/ssl.conf;
- client_max_body_size 0;
- location / {
- # auth_basic "Restricted";
- # auth_basic_user_file /config/nginx/.htpasswd;
- proxy_set_header Host $host;
- proxy_redirect http:// https://;
- proxy_http_version 1.1;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_buffering off;
- proxy_ssl_verify off;
- # include /config/nginx/proxy.conf;
- proxy_pass http://x.x.x.x:8123;
- }
- }
- # enable subdomain method reverse proxy confs
- include /config/nginx/proxy-confs/*.subdomain.conf;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement