Multiple app_urls per site #1425

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

Originally created by @michaell104 on GitHub (Oct 25, 2019).

Currently I have the app working on the following url
site1.example.com/help

I'd like to be able to have the same instance accessible from another url for example
site2.example.com/help without being redirected to site1.example.com/help

I'm using nginx as a proxy and a webserver in the following configuration.
reverseproxy (nginx) --> webserver (nginx/php) and I can "access" the site under the 2nd url but after the first request I'm redirected back to the site1.example.com/help url.

In short I'd like to set the APP_URL dynamically based on the request url. So that the url in the browser is always the one the user enters/follows a link too.

Originally created by @michaell104 on GitHub (Oct 25, 2019). Currently I have the app working on the following url site1.example.com/help I'd like to be able to have the same instance accessible from another url for example site2.example.com/help without being redirected to site1.example.com/help I'm using nginx as a proxy and a webserver in the following configuration. reverseproxy (nginx) --> webserver (nginx/php) and I can "access" the site under the 2nd url but after the first request I'm redirected back to the site1.example.com/help url. In short I'd like to set the APP_URL dynamically based on the request url. So that the url in the browser is always the one the user enters/follows a link too.
Author
Owner

@ssddanbrown commented on GitHub (Oct 25, 2019):

Hi @drifter104,
Are you able to explain the use-case in having those two different URLs pointing to a single BookStack instance?

@ssddanbrown commented on GitHub (Oct 25, 2019): Hi @drifter104, Are you able to explain the use-case in having those two different URLs pointing to a single BookStack instance?
Author
Owner

@michaell104 commented on GitHub (Nov 5, 2019):

Hi (sorry for the delay)

We have different instances of our software hosted through different urls for different users. Some users are accessing through servers that give them url restrictions so they only have access to the url where their software instance is hosted (e.g. site2.example.com) and would not be able to access any content hosted on another url (e.g.site1.example.com).

We want to be able to host the same software documentation for all users but because of the url restrictions of some users, the easiest way for us to do this would be to have the same instance working on different urls. This way all our users would have access to the same content.

@michaell104 commented on GitHub (Nov 5, 2019): Hi (sorry for the delay) We have different instances of our software hosted through different urls for different users. Some users are accessing through servers that give them url restrictions so they only have access to the url where their software instance is hosted (e.g. site2.example.com) and would not be able to access any content hosted on another url (e.g.site1.example.com). We want to be able to host the same software documentation for all users but because of the url restrictions of some users, the easiest way for us to do this would be to have the same instance working on different urls. This way all our users would have access to the same content.
Author
Owner

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

Thanks for describing the use-case.

The support of multiple base-urls is already open under a few different issues, such as #1342, So I'll therefore close this off to reduce duplication.

@ssddanbrown commented on GitHub (Jul 12, 2020): Thanks for describing the use-case. The support of multiple base-urls is already open under a few different issues, such as #1342, So I'll therefore close this off to reduce duplication.
Author
Owner

@Stefansen commented on GitHub (Jun 28, 2024):

I have the same issue while using bookstack app. I have no public ip address, so via internet I need to connect through FRP servers to my bookstack app. But in home I can connect bookstack app use local network through local ip. But because of the APP_URL support only one domain, it impossible in this situation. so if any methods can support multiple domain config.

@Stefansen commented on GitHub (Jun 28, 2024): I have the same issue while using bookstack app. I have no public ip address, so via internet I need to connect through FRP servers to my bookstack app. But in home I can connect bookstack app use local network through local ip. But because of the APP_URL support only one domain, it impossible in this situation. so if any methods can support multiple domain config.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1425