Advertisement
Guest User

Untitled

a guest
Sep 14th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. ## Version 2018/04/20 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/default
  2.  
  3. # listening on port 80 disabled by default, remove the "#" signs to enable
  4. # redirect all traffic to https
  5. #server {
  6. # listen 80;
  7. # server_name _;
  8. # return 301 https://$host$request_uri;
  9. #}
  10.  
  11. ################################################################################
  12. #### PORT 80 ACTIVE ############################################################
  13. # listening on port 80 disabled by default, remove the "#" signs to enable
  14. # redirect all traffic to https
  15. server {
  16. listen 80;
  17. server_name benita-*.duckdns.org;
  18. return 301 https://$host$request_uri;
  19. }
  20. ################################################################################
  21. ################################################################################
  22.  
  23. # sample reverse proxy config without url base, but as a subdomain "cp", ip and port same as above
  24. # notice this is a new server block, you need a new server block for each subdomain
  25. #server {
  26. # listen 443 ssl;
  27. #
  28. # root /config/www;
  29. # index index.html index.htm index.php;
  30. #
  31. # server_name cp.*;
  32. #
  33. # include /config/nginx/ssl.conf;
  34. #
  35. # client_max_body_size 0;
  36. #
  37. # location / {
  38. # auth_basic "Restricted";
  39. # auth_basic_user_file /config/nginx/.htpasswd;
  40. # include /config/nginx/proxy.conf;
  41. # proxy_pass http://192.168.1.50:5050;
  42. # }
  43. #}
  44.  
  45. ################################################################################
  46. ### SUBDOMAIN 1 ##################################################################
  47. #server {
  48. # listen 443 ssl;
  49.  
  50. # root /config/www;
  51. # index index.html index.htm index.php;
  52.  
  53. # server_name mydomain-hass.duckdns.org;
  54.  
  55. # include /config/nginx/ssl.conf;
  56.  
  57. # client_max_body_size 0;
  58.  
  59. # location / {
  60. ## auth_basic "Restricted";
  61. ## auth_basic_user_file /config/nginx/.htpasswd;
  62. # include /config/nginx/proxy.conf;
  63. # proxy_pass http://hostip:5050;
  64. # }
  65. #}
  66.  
  67. ### SUBDOMAIN 2 ###############################################################
  68. server {
  69. listen 443 ssl;
  70.  
  71. root /config/www;
  72. index index.html index.htm index.php;
  73.  
  74. server_name mydomain-mqtt.duckdns.org;
  75.  
  76. include /config/nginx/ssl.conf;
  77.  
  78. client_max_body_size 0;
  79.  
  80. location / {
  81. # auth_basic "Restricted";
  82. # auth_basic_user_file /config/nginx/.htpasswd;
  83. include /config/nginx/proxy.conf;
  84. proxy_pass http://x.x.x.x:1883;
  85. }
  86. }
  87.  
  88. ### HOMEASSISTANT ##############################################################
  89. server {
  90. listen 443 ssl;
  91.  
  92. root /config/www;
  93. index index.html index.htm index.php;
  94.  
  95. server_name benita-hass.duckdns.org;
  96.  
  97. include /config/nginx/ssl.conf;
  98.  
  99. client_max_body_size 0;
  100.  
  101. location / {
  102. # auth_basic "Restricted";
  103. # auth_basic_user_file /config/nginx/.htpasswd;
  104. proxy_set_header Host $host;
  105. proxy_redirect http:// https://;
  106. proxy_http_version 1.1;
  107. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  108. proxy_set_header Upgrade $http_upgrade;
  109. proxy_set_header Connection "upgrade";
  110. proxy_buffering off;
  111. proxy_ssl_verify off;
  112. # include /config/nginx/proxy.conf;
  113. proxy_pass http://x.x.x.x:8123;
  114. }
  115. }
  116.  
  117. # enable subdomain method reverse proxy confs
  118. include /config/nginx/proxy-confs/*.subdomain.conf;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement