.../bookstack/bookstack: BookStack starts with a page that doesn't exist #770

Closed
opened 2026-02-04 22:14:10 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @tomasjay on GitHub (Aug 11, 2018).

Describe the bug
In my installation, after login, BookStack redirects to the address .../bookstack/bookstack which is not linked to any content. This only happens after login. All links to book overview, books, chapters and pages work fine during continued use.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Login
  2. The address in the browser shows domain.tld/bookstack/bookstack
  3. For obvious reasons, BookStack shows the reply "Page not found. - Sorry, The page you were looking for could not be found."

Expected behavior
BookStack should go to the list of books as defined in settings.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.23.0
  • PHP Version: php -v returns the following: PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )
  • Using Docker or reverse proxy (Yes/No): Docker no, and I don't know what a reverse proxy is.
  • BookStack is installed in /var/www/bookstack, while document root is /var/www/html.
  • .env file points to APP_URL=https://domain.tld/bookstack

Additional context
I downloaded BookStack into a folder "bookstack". So I had the path bookstack/bookstack. Cannot remember at which point during installation I found this out. I moved the installed files up, everything worked fine except for the issue described above.

I could not find any existing rewrite rules which could cause this issue. On the other hand, my tries to rewrite bookstack/bookstack to the bookstack/public folder were not successful either. And I would prefer to cure the cause and not the symptoms. Is it possible that BookStack reads some value from a config file or from the database after login, which in my case is wrong?

Your advice is appreciated, Thomas

Originally created by @tomasjay on GitHub (Aug 11, 2018). **Describe the bug** In my installation, after login, BookStack redirects to the address .../bookstack/bookstack which is not linked to any content. This only happens after login. All links to book overview, books, chapters and pages work fine during continued use. **Steps To Reproduce** Steps to reproduce the behavior: 1. Login 2. The address in the browser shows domain.tld/bookstack/bookstack 3. For obvious reasons, BookStack shows the reply "Page not found. - Sorry, The page you were looking for could not be found." **Expected behavior** BookStack should go to the list of books as defined in settings. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.23.0 - PHP Version: php -v returns the following: `PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )` - Using Docker or reverse proxy (Yes/No): Docker no, and I don't know what a reverse proxy is. - BookStack is installed in /var/www/bookstack, while document root is /var/www/html. - .env file points to APP_URL=https://domain.tld/bookstack **Additional context** I downloaded BookStack into a folder "bookstack". So I had the path bookstack/bookstack. Cannot remember at which point during installation I found this out. I moved the installed files up, everything worked fine except for the issue described above. I could not find any existing rewrite rules which could cause this issue. On the other hand, my tries to rewrite bookstack/bookstack to the bookstack/public folder were not successful either. And I would prefer to cure the cause and not the symptoms. Is it possible that BookStack reads some value from a config file or from the database after login, which in my case is wrong? Your advice is appreciated, Thomas
OVERLORD added the 🐛 Bug🏭 Back-End labels 2026-02-04 22:14:11 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 12, 2018):

@tomasjay Sorry to hear you're having issues and thanks for the detail in your original post.

Are you able to share the server config you have for this BookStack instance? My suspicion is a URL re-write somewhere causing this.

@ssddanbrown commented on GitHub (Aug 12, 2018): @tomasjay Sorry to hear you're having issues and thanks for the detail in your original post. Are you able to share the server config you have for this BookStack instance? My suspicion is a URL re-write somewhere causing this.
Author
Owner

@aljawaid commented on GitHub (Aug 21, 2018):

@tomasjay thanks for this, I had the same problem for many versions but didn't know how to describe it until your post. The main reason was that everything else was fine when using Bookstack and it was just the 'as soon as you login' situation.

Now I have noticed that, when I log in, the url changes to add an extra manual/public in the address. My setup is: domain.co.uk/manual with manual being the bookstacks app.

@ssddanbrown possibly very true, as I do remember last year getting my hosting company to redirect from the subfolder to the login page as it wasn't automatic.

@aljawaid commented on GitHub (Aug 21, 2018): @tomasjay thanks for this, I had the same problem for many versions but didn't know how to describe it until your post. The main reason was that everything else was fine when using Bookstack and it was just the 'as soon as you login' situation. Now I have noticed that, when I log in, the url changes to add an extra `manual/public` in the address. My setup is: `domain.co.uk/manual` with `manual` being the bookstacks app. @ssddanbrown possibly very true, as I do remember last year getting my hosting company to redirect from the subfolder to the login page as it wasn't automatic.
Author
Owner

@tomasjay commented on GitHub (Oct 12, 2018):

@ssddanbrown : just to make sure that I understood everything correctly. Step 7 of the installation documentation (https://www.bookstackapp.com/docs/admin/installation) says:

Set the web root on your server to point to the BookStack public folder. This is done with the root setting on Nginx or the DocumentRoot setting on Apache.

Does that mean that the document root for all sites should point to this directory?

@tomasjay commented on GitHub (Oct 12, 2018): @ssddanbrown : just to make sure that I understood everything correctly. Step 7 of the installation documentation (https://www.bookstackapp.com/docs/admin/installation) says: > Set the web root on your server to point to the BookStack public folder. This is done with the root setting on Nginx or the DocumentRoot setting on Apache. Does that mean that the document root for **all** sites should point to this directory?
Author
Owner

@tomasjay commented on GitHub (Oct 12, 2018):

sorry, was a bit quick in closing this issue.

@tomasjay commented on GitHub (Oct 12, 2018): sorry, was a bit quick in closing this issue.
Author
Owner

@tomasjay commented on GitHub (Oct 12, 2018):

ok, now it seems I have a stable workaround with a Redirect in the .htaccess file.
Redirect 301 /bookstack/bookstack /bookstack/

@tomasjay commented on GitHub (Oct 12, 2018): ok, now it seems I have a stable workaround with a Redirect in the .htaccess file. `Redirect 301 /bookstack/bookstack /bookstack/`
Author
Owner

@ssddanbrown commented on GitHub (Oct 14, 2018):

Found this is a bug in the BookStack url system, during conversations of #1048.
Have marked this to be fixed for the next release.

@ssddanbrown commented on GitHub (Oct 14, 2018): Found this is a bug in the BookStack url system, during conversations of #1048. Have marked this to be fixed for the next release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#770