linuxserver/docker-bookstack

[BUG] Bookstack redirects to weird url, page broken

Elekam opened this issue · 3 comments

Elekam commented

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When trying to access bookstack through bookstack.my-domain with my reverse proxy, I get a connection failed page.

When trying to access bookstack directly with server-ip:6875, I get a broken page like shown in the screenshots.
The url then changes to http://server-ip:6875/bookstack.my-domain/bookstack.my-domain/login.
When trying to press any of the buttons shown in the screenshot, nothing happens.
When changing the APP_URL to my server-ip, the same behaviour occurs except bookstack.my-domain is replaced with the server-ip.

Capture
Capture2

Expected Behaviour

Accessing bookstack through bookstack.my-domain shows me the homepage of bookstack.

Steps To Reproduce

  1. Using the latest bookstack-image
  2. Using the given docker-compose
  3. Run

Environment

- OS: Synology NAS 920+, Linux 4.4.180+

CPU architecture

x86-64

Docker creation

version: "2"
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1028
      - PGID=1028
      - APP_URL=bookstack.my-domain
      - DB_HOST=bookstack_db
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS=password
      - DB_DATABASE=bookstackapp
    volumes:
      - /volume1/docker/bookstack/bookstack_app_data:/config
    ports:
      - 6875:80
    restart: unless-stopped
    depends_on:
      - bookstack_db

  bookstack_db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - PUID=0
      - PGID=0
      - MYSQL_ROOT_PASSWORD=password
      - TZ=Europe/Berlin
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=password
    volumes:
      - /volume1/docker/bookstack/bookstack_db_data:/config
    restart: unless-stopped

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1028
User GID:    1028
───────────────────────────────────────
using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
**** APP_URL in /config/www/.env is being updated from 10.0.50.50:6875 to bookstack.k-server.me ****
**** If this is an existing install, you should run the following line from your host terminal to update the database URL entries: ****
************************************************************************
docker exec -it bookstack php /app/www/artisan bookstack:update-url 10.0.50.50:6875 bookstack.k-server.me
************************************************************************
Waiting for DB to be available
   INFO  Nothing to migrate.  
[custom-init] No custom files found, skipping...
[ls.io-init] done.


BOOKSTACK-DB:
[migrations] started
[migrations] no migrations found
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
cp: not replacing '/config/custom.cnf'
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    0
User GID:    0
───────────────────────────────────────
[custom-init] No custom files found, skipping...
230613 15:43:56 mysqld_safe Logging to '/config/databases/56e475316dfb.err'.
230613 15:43:56 mysqld_safe Starting mariadbd daemon with databases from /config/databases
[ls.io-init] done.

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Did you do what it says in the log?

Elekam commented

If you mean the migrating from existing install thing, no, because this is a fresh install anyways which I just restarted multiple times to test whats going wrong.

I made 2 mistakes.
First, I forgot to enable the SSL Certificate for the redirection to bookstack.my-domain in Nginx Proxy Manager. Second, I gave the domain without https:// at first.

That caused bookstack to try to redirect me multiple times I guess.
So even when i gave my domain with https://, I would get an error aswell because of the missing certificate.

Amateur mistakes, sorry to bother you all :)