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;
- #}
- # main server block
- server {
- listen 443 ssl default_server;
- root /config/www;
- index index.html index.htm index.php;
- server_name xxxxxxxx.duckdns.org;
- # enable subfolder method reverse proxy confs
- include /config/nginx/proxy-confs/*.subfolder.conf;
- # all ssl related config moved to ssl.conf
- include /config/nginx/ssl.conf;
- client_max_body_size 0;
- location / {
- try_files $uri $uri/ /index.html /index.php?$args =404;
- }
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # With php7-cgi alone:
- fastcgi_pass 192.168.1.11:9000;
- # With php7-fpm:
- #fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- include /etc/nginx/fastcgi_params;
- }
- # sample reverse proxy config for password protected couchpotato running at IP 192.168.1.50 port 5050 with base url "cp"
- # notice this is within the same server block as the base
- # don't forget to generate the .htpasswd file as described on docker hub
- # location ^~ /cp {
- # auth_basic "Restricted";
- # auth_basic_user_file /config/nginx/.htpasswd;
- # include /config/nginx/proxy.conf;
- # proxy_pass http://192.168.1.50:5050/cp;
- # }
- }
- # 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;
- # }
- #}
- ### HOMEASSISTANT ##############################################################
- server {
- listen 443 ssl;
- root /config/www;
- index index.html index.htm index.php;
- server_name hass.xxxxxxx.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://192.168.1.11:yyyy;
- }
- }
- ### CONFIGURATOR ###############################################################
- server {
- listen 443 ssl;
- root /config/www;
- index index.html index.htm index.php;
- server_name conf.xxxxxxx.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://192.168.1.11:3218;
- }
- }
- ### GRAFANA ####################################################################
- server {
- listen 443 ssl;
- root /config/www;
- index index.html index.htm index.php;
- server_name graf.xxxxxxx.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://192.168.1.11:3003;
- }
- }
- # enable subdomain method reverse proxy confs
- include /config/nginx/proxy-confs/*.subdomain.conf;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement