Question: Wildcard support #1073

Closed
opened 2026-02-04 23:40:57 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @Nebucatnetzer on GitHub (Mar 5, 2019).

I'm using BookStack as my main landing point for 2li.ch and *.2li.ch
This means that when someone enters a subdomain which doesn't have a server behind it they redirected to my BookStack instance.
However when the URL is a subdomain it doesn't recognize that the use is logged in, is there a way to do this with BookStack so that it works with subdomains?

Originally created by @Nebucatnetzer on GitHub (Mar 5, 2019). I'm using BookStack as my main landing point for 2li.ch and *.2li.ch This means that when someone enters a subdomain which doesn't have a server behind it they redirected to my BookStack instance. However when the URL is a subdomain it doesn't recognize that the use is logged in, is there a way to do this with BookStack so that it works with subdomains?
OVERLORD added the Question label 2026-02-04 23:40:57 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 8, 2019):

Hi @Nebucatnetzer,

Just as a foreword we don't really support multiple host domains being used for a single BookStack instance.

That said, you are probably getting this due to the session cookies being served per-domain.
You can try adding this to your .env file:

SESSION_DOMAIN=2li.ch

That way I think the cookies will be shared across 2li.ch and all subdomains.
Let me know if that works for you.

@ssddanbrown commented on GitHub (Mar 8, 2019): Hi @Nebucatnetzer, Just as a foreword we don't really support multiple host domains being used for a single BookStack instance. That said, you are probably getting this due to the session cookies being served per-domain. You can try adding this to your `.env` file: ``` SESSION_DOMAIN=2li.ch ``` That way I think the cookies will be shared across 2li.ch and all subdomains. Let me know if that works for you.
Author
Owner

@Nebucatnetzer commented on GitHub (Mar 8, 2019):

Works perfectly, exactly what I needed. Thank you for your help and the great work :)

@Nebucatnetzer commented on GitHub (Mar 8, 2019): Works perfectly, exactly what I needed. Thank you for your help and the great work :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1073