This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| unraid:dockers:swag [2021/01/30 14:10] – created dirk | unraid:dockers:swag [2023/11/25 11:32] (current) – [SWAG] dirk | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== SWAG ====== | ====== SWAG ====== | ||
| - | Secure Web Application Gateway is a rebirth of our letsencrypt docker image, a full fledged web server and reverse proxy that includes Nginx, Php7, Certbot (Let's Encrypt client) and Fail2ban. Before running this container, make sure that the url and subdomains are properly forwarded to this container' | + | Secure Web Application Gateway is a rebirth of the letsencrypt docker image, a full fledged web server and reverse proxy that includes Nginx, Php7, Certbot (Let's Encrypt client) and Fail2ban. Before running this container, make sure that the url and subdomains are properly forwarded to this container' |
| ===== Version ===== | ===== Version ===== | ||
| Line 24: | Line 24: | ||
| * Propagation: | * Propagation: | ||
| - | ===== App Settings | + | ===== Random Fixes ===== |
| - | * appdata/ | + | ==== stream |
| - | | + | * After last update, websites would not load and had following error in swag logs:< |
| + | * Found fix in forums: | ||
| + | * connect to terminal inside docker using vxcode or docker exec | ||
| + | * execute following< | ||
| + | ls -al / | ||
| + | mv -v / | ||
| + | * restart swag | ||
| + | * Found longer term fix... just update some outdated config files with the newer samples and all was well again. | ||
| + | |||
| + | ==== dashboard ==== | ||
| + | * Add variable to swag | ||
| + | * Name: Dashboard | ||
| + | * Key: DOCKER_MODS | ||
| + | * Value: linuxserver/ | ||
| + | * add CNAME for dashboard and add dashboard to swag subdomains | ||
| + | * conf file was auto added | ||
| + | * restart swag | ||
| + | |||
| + | ===== appdata/ | ||
| + | ==== bazarr.subdomain.conf | ||
| + | < | ||
| server { | server { | ||
| Line 66: | Line 86: | ||
| } | } | ||
| </ | </ | ||
| - | * deluge.subdomain.conf < | + | ==== deluge.subdomain.conf |
| + | < | ||
| server { | server { | ||
| Line 106: | Line 127: | ||
| } | } | ||
| </ | </ | ||
| - | * dokuwiki.subdomain.conf < | + | ==== dokuwiki.subdomain.conf |
| + | < | ||
| # Make sure that your dns has a cname set for dokuwiki | # Make sure that your dns has a cname set for dokuwiki | ||
| Line 147: | Line 169: | ||
| } | } | ||
| </ | </ | ||
| - | * edge.subdomain.conf < | + | ==== edge.subdomain.conf |
| + | < | ||
| listen 80; | listen 80; | ||
| server_name edge.*; | server_name edge.*; | ||
| Line 174: | Line 197: | ||
| } | } | ||
| </ | </ | ||
| - | | + | ==== games.subdomain.conf ==== |
| + | < | ||
| + | |||
| + | server { | ||
| + | listen 443 ssl; | ||
| + | listen [::]:443 ssl; | ||
| + | |||
| + | server_name games.*; | ||
| + | |||
| + | include / | ||
| + | |||
| + | client_max_body_size 0; | ||
| + | |||
| + | #enable for ldap auth, fill in ldap details in ldap.conf | ||
| + | #include / | ||
| + | |||
| + | # enable for Authelia | ||
| + | #include / | ||
| + | |||
| + | location / { | ||
| + | #enable the next two lines for http auth | ||
| + | #auth_basic " | ||
| + | # | ||
| + | |||
| + | #enable the next two lines for ldap auth | ||
| + | # | ||
| + | #error_page 401 =200 / | ||
| + | |||
| + | # enable for Authelia | ||
| + | #include / | ||
| + | |||
| + | include / | ||
| + | resolver 127.0.0.11 valid=30s; | ||
| + | set $upstream_app games; | ||
| + | set $upstream_port 8080; | ||
| + | set $upstream_proto http; | ||
| + | proxy_pass $upstream_proto:// | ||
| + | |||
| + | } | ||
| + | }</ | ||
| + | ==== home.subdomain.conf ==== | ||
| + | * only works if hoobs is installed on a vm | ||
| + | < | ||
| + | # make sure that your dns has a cname set for home | ||
| + | |||
| + | server { | ||
| + | listen 443 ssl http2; | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | #access_log / | ||
| + | #error_log / | ||
| + | # | ||
| + | # ssl on; | ||
| + | # | ||
| + | # ssl_certificate / | ||
| + | # ssl_certificate_key / | ||
| + | |||
| + | | ||
| + | proxy_pass http:// | ||
| + | # proxy_redirect off; | ||
| + | proxy_redirect http:// https://; | ||
| + | #added line below | ||
| + | proxy_http_version 1.1; | ||
| + | proxy_set_header Host $http_host; | ||
| + | proxy_set_header X-Real-IP $remote_addr; | ||
| + | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| + | proxy_set_header X-Forwarded-Proto $scheme; | ||
| + | proxy_set_header X-Forwarded-Protocol $scheme; | ||
| + | proxy_set_header X-Url-Scheme $scheme; | ||
| + | #added these 2 lines below | ||
| + | proxy_set_header Upgrade $http_upgrade; | ||
| + | proxy_set_header Connection " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | ==== nextcloud.subdomain.conf | ||
| + | * extra steps found below and on youtube | ||
| + | < | ||
| # assuming this container is called " | # assuming this container is called " | ||
| # located at / | # located at / | ||
| Line 211: | Line 313: | ||
| } | } | ||
| </ | </ | ||
| - | | + | ==== pi.subdomain.conf ==== |
| + | | ||
| + | < | ||
| + | ## Version 2020/ | ||
| + | # make sure that your dns has a cname set for pihole and that your pihole container is not using a base url | ||
| + | |||
| + | server { | ||
| + | listen 443 ssl; | ||
| + | listen [::]:443 ssl; | ||
| + | |||
| + | server_name pi.*; | ||
| + | |||
| + | include / | ||
| + | |||
| + | client_max_body_size 0; | ||
| + | |||
| + | # enable for ldap auth, fill in ldap details in ldap.conf | ||
| + | #include / | ||
| + | |||
| + | # enable for Authelia | ||
| + | #include / | ||
| + | |||
| + | location / { | ||
| + | # enable the next two lines for http auth | ||
| + | #auth_basic " | ||
| + | # | ||
| + | |||
| + | # enable the next two lines for ldap auth | ||
| + | # | ||
| + | #error_page 401 =200 / | ||
| + | |||
| + | # enable for Authelia | ||
| + | #include / | ||
| + | |||
| + | include / | ||
| + | resolver 127.0.0.11 valid=30s; | ||
| + | set $upstream_app 192.168.1.2; | ||
| + | set $upstream_port 80; | ||
| + | set $upstream_proto http; | ||
| + | proxy_pass $upstream_proto:// | ||
| + | |||
| + | proxy_hide_header X-Frame-Options; | ||
| + | } | ||
| + | |||
| + | location /admin { | ||
| + | # enable the next two lines for http auth | ||
| + | #auth_basic " | ||
| + | # | ||
| + | |||
| + | # enable the next two lines for ldap auth | ||
| + | # | ||
| + | #error_page 401 =200 / | ||
| + | |||
| + | # enable for Authelia | ||
| + | #include / | ||
| + | |||
| + | include / | ||
| + | resolver 127.0.0.11 valid=30s; | ||
| + | set $upstream_app 192.168.1.2; | ||
| + | set $upstream_port 80; | ||
| + | set $upstream_proto http; | ||
| + | proxy_pass $upstream_proto:// | ||
| + | |||
| + | proxy_hide_header X-Frame-Options; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | ==== plex.subdomain.conf | ||
| + | < | ||
| # if plex is running in bridge mode and the container is named " | # if plex is running in bridge mode and the container is named " | ||
| # if not, replace the line "set $upstream_app plex;" with "set $upstream_app < | # if not, replace the line "set $upstream_app plex;" with "set $upstream_app < | ||
| Line 271: | Line 441: | ||
| } | } | ||
| </ | </ | ||
| - | * radarr.subdomain.conf < | + | ==== radarr.subdomain.conf |
| + | < | ||
| server { | server { | ||
| Line 321: | Line 492: | ||
| } | } | ||
| </ | </ | ||
| - | * sabnzbd.subdomain.conf < | + | ==== sabnzbd.subdomain.conf |
| + | < | ||
| # edit the sabnzbd.ini host_whitelist to avoid hostname verification issues. This format: | # edit the sabnzbd.ini host_whitelist to avoid hostname verification issues. This format: | ||
| # host_whitelist = sabnzbd.domain.com, | # host_whitelist = sabnzbd.domain.com, | ||
| Line 373: | Line 545: | ||
| } | } | ||
| </ | </ | ||
| - | * sonarr.subdomain.conf < | + | ==== sonarr.subdomain.conf |
| + | < | ||
| server { | server { | ||
| Line 423: | Line 596: | ||
| } | } | ||
| </ | </ | ||
| - | * tautulli.subdomain.conf < | + | ==== tautulli.subdomain.conf |
| + | < | ||
| server { | server { | ||
| Line 473: | Line 647: | ||
| } | } | ||
| </ | </ | ||
| - | * unifi-controller.subdomain.conf < | + | ==== unifi-controller.subdomain.conf |
| + | < | ||
| server { | server { | ||
| Line 539: | Line 714: | ||
| } | } | ||
| </ | </ | ||
| - | | + | ==== www.subdomain.conf docker version ==== |
| + | < | ||
| + | |||
| + | server { | ||
| + | listen 443 ssl; | ||
| + | listen [::]:443 ssl; | ||
| + | |||
| + | server_name www.*; | ||
| + | |||
| + | include / | ||
| + | |||
| + | client_max_body_size 0; | ||
| + | |||
| + | #enable for ldap auth, fill in ldap details in ldap.conf | ||
| + | #include / | ||
| + | |||
| + | # enable for Authelia | ||
| + | #include / | ||
| + | |||
| + | location / { | ||
| + | #enable the next two lines for http auth | ||
| + | #auth_basic " | ||
| + | # | ||
| + | |||
| + | #enable the next two lines for ldap auth | ||
| + | # | ||
| + | #error_page 401 =200 / | ||
| + | |||
| + | # enable for Authelia | ||
| + | #include / | ||
| + | |||
| + | include / | ||
| + | resolver 127.0.0.11 valid=30s; | ||
| + | set $upstream_app website; | ||
| + | set $upstream_port 8080; | ||
| + | set $upstream_proto http; | ||
| + | proxy_pass $upstream_proto:// | ||
| + | |||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | ==== www.subdomain.conf | ||
| + | < | ||
| server { | server { | ||