While working with multiple installations of BookStack on a one server in a one browser generates problems with multiple loggin session work #1780

Closed
opened 2026-02-05 01:51:25 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @suvreal on GitHub (Jul 8, 2020).

Description
I have multiple installations of BookStack on one server and I need to maintain them as an administrator. But If I am logged to A installation I can't connect to the B one without any troubles.
If I am logged in installation A and try to log-in to installation B then I register the problem with connecting to the installation B (error 419 Page expired). After this attempt the login session in installation A is dropped while B log-in attempt while there is no set domain - APP_URL in .env (other conditions).

Domains I have set:
first installation - example.something.something
second installation - example.something.something/Ainstallation
third installation - example.something.something/Binstallation

Steps To Reproduce
Steps to reproduce the behavior:
You should have multiple BS installations on your server accessed by path of domains with same admin name/pass combination.

  1. Log-in to A installation as defined above
  2. Try to log-in to B installation
  3. The 419 Page expired error is observable (while other conditions)

Expected behavior
There should be allowed multiple logged sessions for multiple bookstacks accesses.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): BookStack v0.29.3
  • PHP Version: 7.2.24
  • Hosting Method (Nginx/Apache/Docker): Apache 2.4.29, MySQL 5.7.30, Ubuntu 18.04.2 LTS
Originally created by @suvreal on GitHub (Jul 8, 2020). **Description** I have multiple installations of BookStack on one server and I need to maintain them as an administrator. But If I am logged to A installation I can't connect to the B one without any troubles. If I am logged in installation A and try to log-in to installation B then I register the problem with connecting to the installation B (error 419 Page expired). After this attempt the login session in installation A is dropped while B log-in attempt while there is no set domain - APP_URL in .env (_other conditions_). _Domains I have set:_ first installation - example.something.something second installation - example.something.something/Ainstallation third installation - example.something.something/Binstallation **Steps To Reproduce** Steps to reproduce the behavior: You should have multiple BS installations on your server accessed by path of domains with same admin name/pass combination. 1. Log-in to A installation as defined above 2. Try to log-in to B installation 3. The 419 Page expired error is observable (while _other conditions_) **Expected behavior** There should be allowed multiple logged sessions for multiple bookstacks accesses. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): BookStack v0.29.3 - PHP Version: 7.2.24 - Hosting Method (Nginx/Apache/Docker): Apache 2.4.29, MySQL 5.7.30, Ubuntu 18.04.2 LTS
Author
Owner

@ssddanbrown commented on GitHub (Jul 9, 2020):

Hi @suvreal,
In at least two of the instances could update your .env files for those instances with the following option:

# Instance a:
SESSION_COOKIE_NAME=bookstack_session_a

# Instance b:
SESSION_COOKIE_NAME=bookstack_session_b

Just so each have a unique SESSION_COOKIE_NAME value.
I think you're having issues as, since all your instances are on the same domain, they're currently sharing the same cookie for sessions.

@ssddanbrown commented on GitHub (Jul 9, 2020): Hi @suvreal, In at least two of the instances could update your `.env` files for those instances with the following option: ```bash # Instance a: SESSION_COOKIE_NAME=bookstack_session_a # Instance b: SESSION_COOKIE_NAME=bookstack_session_b ``` Just so each have a unique `SESSION_COOKIE_NAME` value. I think you're having issues as, since all your instances are on the same domain, they're currently sharing the same cookie for sessions.
Author
Owner

@suvreal commented on GitHub (Jul 10, 2020):

Thank you I will try it on Monday and give you appropriate feedback.

@suvreal commented on GitHub (Jul 10, 2020): Thank you I will try it on Monday and give you appropriate feedback.
Author
Owner

@suvreal commented on GitHub (Jul 13, 2020):

Mentioned solution was successful, thank you. Whereas this fix was successful this report ticket is maybe still not closed? I guess.

@suvreal commented on GitHub (Jul 13, 2020): Mentioned solution was successful, thank you. Whereas this fix was successful this report ticket is maybe still not closed? I guess.
Author
Owner

@ssddanbrown commented on GitHub (Jul 18, 2020):

Good to know it worked.

Will therefore close this.

@ssddanbrown commented on GitHub (Jul 18, 2020): Good to know it worked. Will therefore close this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1780