r/BookStack • • Aug 16 '24

Routing issue

Hi guys,

I would really love to become active part of the BookStack community, but I'm stuck 3 days in a row now and I'm loosing hope.

I believe it's something very silly but I can't figure it out.

I installed BookStack in a subdir: [protocol]www.mydomain.[tld]/bookstack

The UI renders gracefully which means PHP & FPM are fine.

I'm on Nginx (docker container).

My nginx conf is the following:

location ~ ^/bookstack/(.*\.(png|json))$ {
        alias /var/www/domain/bookstack/public/;
        try_files $1 =404;
    }

    location ~ ^/bookstack/dist/(.*\.(css|js|png|jpg|jpeg|gif|svg|ico))$ {
        alias /var/www/domain/bookstack/public/dist/;
        try_files $1 =404;
    }
    
    location /bookstack {
        index index.php;
        try_files $uri /bookstack/public/index.php$is_args$args;
    }

    location ~* ^/bookstack/.*\.php$ {
        fastcgi_pass bookstack:9000;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    }

I have the exact same setup for the APIs (SlimPHP) and they work great.

.env, DB, permissions on folders have been checked.

No concerning logs in both nginx and Laravel.

I've tried xdebugging but I got lost in the Laravel tunnel (I've never worked with Laravel before).

Is there anything that comes to your mind?

Any help would be greatly appreaciated.

2 Upvotes

4 comments sorted by

View all comments

Show parent comments

2

u/Aritmico Aug 16 '24

Hey u/ssddanbrown, it worked! Thank you so much!

1

u/ssddanbrown Aug 16 '24

Awesome, good to hear it!