Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- here is my configuration:
- letsencrypt: # https://github.com/linuxserver/docker-letsencrypt
- container_name: letsencrypt
- image: linuxserver/letsencrypt:latest
- restart: unless-stopped
- volumes:
- - /etc/localtime:/etc/localtime:ro
- - /srv/docker/letsencrypt:/config
- environment:
- - PGID=1000
- - PUID=1000
- - EMAIL=xxxx@yahoo.com
- - URL=xxx.duckdns.org
- - SUBDOMAINS=wildcard
- - VALIDATION=duckdns #http
- - TZ=Europe/London
- - DUCKDNSTOKEN=token
- ports:
- - "80:80"
- - "443:443"
- duckdns:
- container_name: duckdns
- image: linuxserver/duckdns
- restart: unless-stopped
- volumes:
- - /srv/docker/duckdns:/config
- environment:
- - PGID=1000
- - PUID=1000
- - SUBDOMAINS=xxx.duckdns.org
- - TOKEN=token
- - LOG_FILE=true
- - TZ=Europe/London
- ports:
- - "1480:80"
- and this is my default file in /srv/docker/letsencrypt/nginx/site-confs/default
- #### PORT 80 ACTIVE
- server {
- listen 80;
- server_name xxx.duckdns.org;
- 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 xxx.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 10.10.10.211:9001;
- #fastcgi_pass 127.0.0.1:9001;
- # With php7-fpm:
- #fastcgi_pass unix:/var/run/php7-fpm.sock;
- fastcgi_index index.php;
- include /etc/nginx/fastcgi_params;
- }
- }
- ### HOMEASSISTANT
- server {
- listen 443 ssl;
- root /config/www;
- index index.html index.htm index.php;
- server_name xxx.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;
- }
- }
- # enable subdomain method reverse proxy confs
- include /config/nginx/proxy-confs/*.subdomain.conf;
- I have also forwarded port 80 to 80 and 443 to 443. when I go to my page i.e. https://xxx.duckdns.org I get the following :
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement