From 152a846611e599943a47741d4441b5c604b2ebe8 Mon Sep 17 00:00:00 2001 From: Dan Opitz Date: Thu, 27 Feb 2020 15:43:54 -0600 Subject: [PATCH 1/2] Adding BookStack Subdomain Config --- bookstack.subdomain.conf.sample | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bookstack.subdomain.conf.sample diff --git a/bookstack.subdomain.conf.sample b/bookstack.subdomain.conf.sample new file mode 100644 index 0000000..6c4fbe0 --- /dev/null +++ b/bookstack.subdomain.conf.sample @@ -0,0 +1,28 @@ +# Ensure you have the APP_URL Environment Variable set correctly in your Docker Run/Compose or in BookStack Env File (/www/.env) +# https://github.com/linuxserver/docker-bookstack#docker + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name bookstack.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + location / { + #enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth + #auth_request /auth; + #error_page 401 =200 /login; + + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_bookstack bookstack; + proxy_pass http://$upstream_bookstack:80; + } +} From 10cd245336d60b589465eb9aa3c430e1863020a9 Mon Sep 17 00:00:00 2001 From: Dan Opitz Date: Thu, 27 Feb 2020 17:10:31 -0600 Subject: [PATCH 2/2] Changing to proto, app, port format --- bookstack.subdomain.conf.sample | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bookstack.subdomain.conf.sample b/bookstack.subdomain.conf.sample index 6c4fbe0..0bba432 100644 --- a/bookstack.subdomain.conf.sample +++ b/bookstack.subdomain.conf.sample @@ -1,3 +1,4 @@ +# make sure that your dns has a cname set for bookstack and that your bookstack container is named bookstack # Ensure you have the APP_URL Environment Variable set correctly in your Docker Run/Compose or in BookStack Env File (/www/.env) # https://github.com/linuxserver/docker-bookstack#docker @@ -22,7 +23,10 @@ server { include /config/nginx/proxy.conf; resolver 127.0.0.11 valid=30s; - set $upstream_bookstack bookstack; - proxy_pass http://$upstream_bookstack:80; + set $upstream_app bookstack; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } }