Hello.
I am using letsencrypt docker, successfully set up as a reverse proxy with subdirectory configs. Everything is working good, exept that I have problems with bookstack behind the letsencrypt reverse proxy. It shows only the site without the css (?)
Here is a picture:
I have all the services I have hostet at home on my subdomain, and every docker container behind a subdirectory.
Since letsencrypt docker comtainer doesn’t come with a bookstack proxy config, I wrote one myself. I’m not very good at nginx proxying, but used another service as a template. Here it is:
fyksen@fyksen-desktop:/tank/docker$ cat nginx/nginx/proxy-confs/bookstack.subfolder.conf
# set the CONTEXT_PATH variable to /booksonic in airsonic container.
location ^~ /bookstack {
# 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, also customize and enable ldap.conf in the default conf
#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 LAN, the service works correctly on hostip:6875
Thanks for the reply.
Yeah, I have tried setting the .env app_url aswell.
I have tried with both setting the app_url in docker-compose and in .env.
Only in .env, and only in docker-compose.
those are already globally present in swag, with the exception of proxy_set_header X-Forwarded-Host $server_name;
ours is proxy_set_header X-Forwarded-Host $host;
I’m having this issue as well. Running on UnRAID. Bookstack is installed in a container, and NGINX Proxy Manager is installed in a separate container on the same custom network.
This is the command that it runs to start the docker:
docker run -d --name=‘bookstack’ --net=‘proxynet’ -e TZ=“America/New_York” -e HOST_OS=“Unraid” -e ‘DB_HOST’=‘192.168.1.238:3306’ -e ‘DB_USER’=‘bookstack’ -e ‘DB_PASS’=‘password’ -e ‘DB_DATABASE’=‘bookstack’ -e ‘APP_URL’=‘192.168.1.238:6875’ -e ‘PUID’=‘99’ -e ‘PGID’=‘100’ -e ‘UMASK’=‘022’ -p ‘6875:80/tcp’ -v ‘/mnt/user/appdata/bookstack’:‘/config’:‘rw’ ‘linuxserver/bookstack:v21.11.1-ls172’
This is the only configuration that “works.” And by work I mean gives me that weird login page, and when i put in username: admin@admin.com password: password it gives me this error:
Oops! An Error Occurred
The server returned a “405 Method Not Allowed”.
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
Bookstack logfile:
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 01-envfile: executing…
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing…
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing…
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing…
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing…
New container detected. Setting up app folder and fixing permissions.
App Key found - setting variable for seds
Running config - db_user set
**** APP_URL in /config/www/.env is being updated from 172.18.0.1 to 192.168.1.238 ****
**** If this is an existing install, you should run the following line from your host terminal to update the database URL entries: ****
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
Nothing to migrate.
[cont-init.d] 50-config: exited 0.
[cont-init.d] 90-custom-folders: executing…
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing…
[custom-init] no custom files found exiting…
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.