[Bug Report]: Getting a 404 on login page since 21.11 #2520

Closed
opened 2026-02-05 04:23:51 +03:00 by OVERLORD · 13 comments
Owner

Originally created by @rparree on GitHub (Dec 2, 2021).

Describe the Bug

I tried updating to version 21.11.2, but when accessing the site and it redirects to /bookstack/login it shows "Page Not Found".

Bookstack is running in kubernetes and i am using the linuxserver images. From a few tests i found out:

does not work

ghcr.io/linuxserver/bookstack:version-v21.11
ghcr.io/linuxserver/bookstack:version-v21.11.2
ghcr.io/linuxserver/bookstack:version-v21.11.3

works

ghcr.io/linuxserver/bookstack:version-v21.10.1
ghcr.io/linuxserver/bookstack:version-v21.10.3

thanks.,

Steps to Reproduce

change version from 21.10.x to 21.11.x

Expected Behaviour

Login page to be displayed

Screenshots or Additional Context

No response

Exact BookStack Version

21.11

PHP Version

No response

Hosting Environment

kubernetes with istio.

Originally created by @rparree on GitHub (Dec 2, 2021). ### Describe the Bug I tried updating to version 21.11.2, but when accessing the site and it redirects to `/bookstack/login` it shows "Page Not Found". Bookstack is running in kubernetes and i am using the linuxserver images. From a few tests i found out: does not work ghcr.io/linuxserver/bookstack:version-v21.11 ghcr.io/linuxserver/bookstack:version-v21.11.2 ghcr.io/linuxserver/bookstack:version-v21.11.3 works ghcr.io/linuxserver/bookstack:version-v21.10.1 ghcr.io/linuxserver/bookstack:version-v21.10.3 thanks., ### Steps to Reproduce change version from 21.10.x to 21.11.x ### Expected Behaviour Login page to be displayed ### Screenshots or Additional Context _No response_ ### Exact BookStack Version 21.11 ### PHP Version _No response_ ### Hosting Environment kubernetes with istio.
OVERLORD added the 🐛 Bug label 2026-02-05 04:23:51 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Dec 2, 2021):

Hi @rparree,

I tried updating to version 21.11.2, but when accessing the site and it redirects to /bookstack/login it shows "Page Not Found".

  • What URL are you hosting BookStack on? Are you hosting at /bookstack or are you hosting at /?
  • What is configured for the APP_URL option?
@ssddanbrown commented on GitHub (Dec 2, 2021): Hi @rparree, > I tried updating to version 21.11.2, but when accessing the site and it redirects to /bookstack/login it shows "Page Not Found". - What URL are you hosting BookStack on? Are you hosting at `/bookstack` or are you hosting at `/`? - What is configured for the `APP_URL` option?
Author
Owner

@rparree commented on GitHub (Dec 2, 2021):

I am hosting on /bookstack, the APP_URL includes the full : https://xxx.yyyy.com/bookstack

tx.,

@rparree commented on GitHub (Dec 2, 2021): I am hosting on `/bookstack`, the `APP_URL` includes the full : `https://xxx.yyyy.com/bookstack` tx.,
Author
Owner

@ssddanbrown commented on GitHub (Dec 6, 2021):

Thanks for confirming @rparree.
Do you have any detail on how requests are sent to the linuxserver container? Are you using a standard reverse proxy? If so can you share the configuration used?

@ssddanbrown commented on GitHub (Dec 6, 2021): Thanks for confirming @rparree. Do you have any detail on how requests are sent to the linuxserver container? Are you using a standard reverse proxy? If so can you share the configuration used?
Author
Owner

@rparree commented on GitHub (Dec 7, 2021):

I am using istio's virtualservice.

This works fine up to version v21.10.1. I should also mention that the "not found" page is the styled one from bookstack. Meaning its css assets etc are successfully fetched

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bookstack
spec:
  hosts:
    - xxxx.yyyy.com
  gateways:
    - kube-system/gw-public
  http:
    - route:
        - destination:
            host: bookstack-0
            port:
              number: 80
      match:
        - uri:
            prefix: /bookstack
      rewrite:
        uri: /
@rparree commented on GitHub (Dec 7, 2021): I am using istio's virtualservice. This works fine up to version `v21.10.1`. I should also mention that the "not found" page is the styled one from bookstack. Meaning its css assets etc are successfully fetched ```yaml apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: bookstack spec: hosts: - xxxx.yyyy.com gateways: - kube-system/gw-public http: - route: - destination: host: bookstack-0 port: number: 80 match: - uri: prefix: /bookstack rewrite: uri: / ```
Author
Owner

@Perrydiculous commented on GitHub (Dec 12, 2021):

I am well aware that this is very basic, and I don't have any experience with your setup, mine's very different, so I'm not thinking I'm brilliantly providing a definite fix here... It's just that I had this exact same problem, couldn't find the cause, and a seemingly random chain of artisan commands fixed it:

php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan config:cache
php artisan bookstack:regenerate-comment-content
php artisan bookstack:regenerate-search
php artisan bookstack:regenerate-permissions
php artisan cache:clear
php artisan config:cache
php artisan view:cache

I'm not saying it works and if it does I can't explain why... I just know I was frustrated and mashing 'm in this order which worked... 😂

(this was after having used every single one of those commands once already, btw, since I updated a ton of versions at once, and probably needed them all, except for the cache ones. That's a precaution I'm taking after the cached DB config once didn't clear properly, due to which an update on my staging destroyed my production)

@Perrydiculous commented on GitHub (Dec 12, 2021): I am well aware that this is very basic, and I don't have any experience with your setup, mine's very different, so I'm not thinking I'm brilliantly providing a definite fix here... It's just that I had this exact same problem, couldn't find the cause, and a seemingly random chain of artisan commands fixed it: ``` php artisan config:clear php artisan cache:clear php artisan view:clear php artisan config:cache php artisan bookstack:regenerate-comment-content php artisan bookstack:regenerate-search php artisan bookstack:regenerate-permissions php artisan cache:clear php artisan config:cache php artisan view:cache ``` I'm not saying it works and if it does I can't explain why... I just know I was frustrated and mashing 'm in this order which worked... 😂 _(this was after having used every single one of those commands once already, btw, since I updated a ton of versions at once, and probably needed them all, except for the cache ones. That's a precaution I'm taking after the cached DB config once didn't clear properly, due to which an update on my staging destroyed my production)_
Author
Owner

@rparree commented on GitHub (Dec 18, 2021):

@Perrydiculous thanks for your help. It however did not help. I am still getting the same error on recent versions while it works on 21.10

version 21.10.3

image

for example version 21.11.3:

image

The /bookstack url works for css and js assets, just not for the login page:
image

@rparree commented on GitHub (Dec 18, 2021): @Perrydiculous thanks for your help. It however did not help. I am still getting the same error on recent versions while it works on 21.10 version 21.10.3 ![image](https://user-images.githubusercontent.com/359605/146633981-ee1fbde0-61c3-4578-8cc7-1b43121917aa.png) for example version 21.11.3: ![image](https://user-images.githubusercontent.com/359605/146633944-8eca3819-9e44-4366-90b3-c441bd333ec6.png) The `/bookstack` url works for css and js assets, just not for the login page: ![image](https://user-images.githubusercontent.com/359605/146634114-3f5bd17d-f97a-4eba-a09b-525acdf92b0a.png)
Author
Owner

@nicolaslopez1989 commented on GitHub (Dec 21, 2021):

Dear good afternoon everyone ..
I have the same problem when updating from version 21.10.3 to 21.11.3. I get a 404 error when accessing the login screen.

Infrastructure detail:
Nginx Reverse Proxy on localhost
Docker container with Centos7 image with php 7.3 + apache as application web server
DB Mysql to external host.

I applied the mentioned solutions but still without success.

Any ideas?

@nicolaslopez1989 commented on GitHub (Dec 21, 2021): Dear good afternoon everyone .. I have the same problem when updating from version 21.10.3 to 21.11.3. I get a 404 error when accessing the login screen. Infrastructure detail: Nginx Reverse Proxy on localhost Docker container with Centos7 image with php 7.3 + apache as application web server DB Mysql to external host. I applied the mentioned solutions but still without success. Any ideas?
Author
Owner

@nicolaslopez1989 commented on GitHub (Dec 23, 2021):

Dear good afternoon everyone .. I have the same problem when updating from version 21.10.3 to 21.11.3. I get a 404 error when accessing the login screen.

Infrastructure detail: Nginx Reverse Proxy on localhost Docker container with Centos7 image with php 7.3 + apache as application web server DB Mysql to external host.

I applied the mentioned solutions but still without success.

Any ideas?

I found the solution:
The new version rewrites the URL to me. It added a / after the domain and before login.

I understand that it is a problem of my configuration since it did not work for me with version 21.11. Or not. I haven't fully verified it yet.

I hope it will help you.

Greetings!

@nicolaslopez1989 commented on GitHub (Dec 23, 2021): > Dear good afternoon everyone .. I have the same problem when updating from version 21.10.3 to 21.11.3. I get a 404 error when accessing the login screen. > > Infrastructure detail: Nginx Reverse Proxy on localhost Docker container with Centos7 image with php 7.3 + apache as application web server DB Mysql to external host. > > I applied the mentioned solutions but still without success. > > Any ideas? I found the solution: The new version rewrites the URL to me. It added a / after the domain and before login. I understand that it is a problem of my configuration since it did not work for me with version 21.11. Or not. I haven't fully verified it yet. I hope it will help you. Greetings!
Author
Owner

@jakubboucek commented on GitHub (Jan 21, 2022):

Same problem :-(

@jakubboucek commented on GitHub (Jan 21, 2022): Same problem :-(
Author
Owner

@ssddanbrown commented on GitHub (Jan 23, 2022):

Just to provide an update, I have tested path-based proxied instances and it's not that alone since my existing dev instances worked fine.

I was able to re-produce this (Although I didn't check against older BookStack versions) in once Apache proxy instance where I found the proxying was causing an extra slash to be added to the path in the request to BookStack. A tweak to the proxy passing got this working fine. Below is an example of the config change I made.

Config Changes

Broken

ProxyPass "/bs"  "http://bookstack.local/"
ProxyPassReverse "/bs"  "http://bookstack.local/"

Working

ProxyPass "/bs"  "http://bookstack.local"
ProxyPassReverse "/bs"  "http://bookstack.local"
@ssddanbrown commented on GitHub (Jan 23, 2022): Just to provide an update, I have tested path-based proxied instances and it's not that alone since my existing dev instances worked fine. I was able to re-produce this (Although I didn't check against older BookStack versions) in once Apache proxy instance where I found the proxying was causing an extra slash to be added to the path in the request to BookStack. A tweak to the proxy passing got this working fine. Below is an example of the config change I made. <details> <summary>Config Changes</summary> ### Broken ```apache ProxyPass "/bs" "http://bookstack.local/" ProxyPassReverse "/bs" "http://bookstack.local/" ``` ### Working ```apache ProxyPass "/bs" "http://bookstack.local" ProxyPassReverse "/bs" "http://bookstack.local" ``` </details>
Author
Owner

@ssddanbrown commented on GitHub (May 9, 2022):

In v22.04 I made further changes to URL handling related to an issue that was likely connected to this one.
Since there was no further progress on this issue thread, and since we've since made further changes, I'm going to close this off.
If you're still having issues on the latest release feel free to comment to request this be re-opened.

@ssddanbrown commented on GitHub (May 9, 2022): In v22.04 I made further changes to URL handling related to an issue that was likely connected to this one. Since there was no further progress on this issue thread, and since we've since made further changes, I'm going to close this off. If you're still having issues on the latest release feel free to comment to request this be re-opened.
Author
Owner

@rparree commented on GitHub (May 12, 2022):

I checked with the updated version and had the same problem.

I have moved our bookstack to a subdomain instead of path-based. So i am avoiding the problem.

@rparree commented on GitHub (May 12, 2022): I checked with the updated version and had the same problem. I have moved our bookstack to a subdomain instead of path-based. So i am avoiding the problem.
Author
Owner

@mgueydan commented on GitHub (Feb 5, 2023):

Hi everybody.

Just to say I had the same issue, due to the fact that : the mod_redirection was not enabled on my apache.

Apache configuration was correctly protected :
<IfModule mod_rewrite.c> ...
so rewriting was not made

So I had to enable rewrite module
sudo a2enmod rewrite

I assume, that module "mod_negotiation.c" should be enabled too.

Have a nice day.

@mgueydan commented on GitHub (Feb 5, 2023): Hi everybody. Just to say I had the same issue, due to the fact that : the mod_redirection was not enabled on my apache. Apache configuration was correctly protected : `<IfModule mod_rewrite.c> ...` so rewriting was not made So I had to enable rewrite module `sudo a2enmod rewrite` I assume, that module "mod_negotiation.c" should be enabled too. Have a nice day.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2520