Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logon redirects to wrong URL when using a different base URL #2624

Closed
chrisnewmanuk opened this issue Mar 8, 2021 · 6 comments
Closed

Logon redirects to wrong URL when using a different base URL #2624

chrisnewmanuk opened this issue Mar 8, 2021 · 6 comments

Comments

@chrisnewmanuk
Copy link

chrisnewmanuk commented Mar 8, 2021

Describe the bug
A clear and concise description of what the bug is.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Setup base URLs with a sub dir
  2. Login
  3. Goes to https://domain/sub/sub rather than https://domain/sub

Screenshots
Wrong sub dir location immediately after logon:
image

Works fine at the right sub dir location:
image

Your Configuration (please complete the following information):
latest.
baseurl is https://domain:8080/docs

Additional context
Add any other context about the problem here.

@ssddanbrown
Copy link
Member

Thanks for the request @chrisnewmanuk.

I think #1377 and #2058 cover the same reported issue, both of which have been assigned to the next release. Therefore I'll close this off as a duplicate but if you continue to have problems after the next feature release feel free to re-create/open.

@ShuffleBox
Copy link

Should this issue have been resolved by (including before) the BookStack v21.04.3 release, or one upcoming?

@prbt2016
Copy link

prbt2016 commented May 17, 2021

Hello @ssddanbrown

I am also facing the same issue in Bookstack version 21.04.5 while installing in a subdirectory on Centos 6.9 Final with Apache 2.2, PHP 7.3, MYSQL 5.7.

After following the steps mentioned here :

https://www.bookstackapp.com/docs/admin/installation/

Post installation, on hitting admin URL i.e :

http://example.com/manual/bookstack/public/login

and after entering default admin details i.e admin email and admin password, the page is being redirected to wrong url i.e :

http://example.com/manual/bookstack/public/manual/bookstack2104/public

Is there any way or fix to resolve this?.

@ssddanbrown
Copy link
Member

@prbt2016 If you've uploaded BookStack into the subdirectory of another website then it'll likely be insecure and not something we support.

BookStack can still be used at a "subdirectory" of a URL (eg. https://example.com/manual) but it has to be done via proxies or alias or similar, as described here for example. You can't just copy the files into an existing site. The abilities to set this up may depend on your hosting.

@prbt2016
Copy link

prbt2016 commented May 22, 2021

@ssddanbrown I tried installing Bookstack 21.04.5 in root directory of website as well i.e http://example.com.

However get the same issue after logging in i.e the URL redirects to :

http://example.com/public/public

In .env file I have set up my APP_URL to :

APP_URL=http://example.com/public

Is there any way by which Bookstack can be configured without VirtualHost setup as I am using shared hosting and don't have access to Apache configuration.

Is Bookstack compatible with shared hosting?

@ssddanbrown
Copy link
Member

Is there any way by which Bookstack can be configured without VirtualHost setup as I am using shared hosting and don't have access to Apache configuration.

Is Bookstack compatible with shared hosting?

@prbt2016 Not really. It's likely possible by editing files or using a more complex htaccess configuration but not something I'll support by default or encourage. It's too easy to get things wrong and result in an insecure setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants