-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
possibility that the application work in a subdirectory of a site #40
Comments
Hi, I'm sure there's ways around this with careful apache/nginx/other config editing but it would make things too easy to get wrong. At the moment the set-up somewhat forces you to have a more secure structure or at least makes you think about it. I understand that it would make things easier for using on shared web services but these days decent VPS solutions are becoming very affordable so this is becoming less of an issue. This is definitely technically possible to do, It's just my gut feeling is against it. I will leave this issue open for discussion though so potential solutions/reasoning's can be added. |
This would be definitely a security flow. The server administrator could use Apache2 aliases for that functionality (as phpMyAdmin is using by default). |
Running into issues with a dockerised container, and nginx reverse proxy to put it on a sub directory. Loads but all the CSS / JS is pointing at the wrong place, and navigating anywhere breaks. Tried with and without the rewrite rules, but doesn't seem to have any effect, any ideas?
|
@poppahorse Yeah, Pretty much all links and assets are referenced as root relative. Need to go over all links and covert them to be app relative. Since you've shown a good use case of using BookStack in a subdomain securely (Proxying to a docker container) I'll remove the 'Open to discussion' label and mark this as something to be done. |
Awesome thanks! I know this issue is an oldie, and dont want to sound pushy, but any idea of a rough timeline? 😛 Got 4 projects lined up that I'd love to use bookstack for, 2 of them fairly imminent 😃 |
@poppahorse I was looking to do a bit of BookStack bug-bash session this weekend. If I have enough time I'll include this within the bug-bash. |
thanks, that would be great! for the prompt responses 👍 |
Okay this should now be possible as of v0.11.1 that was just released. I'll add the process to the docs soon but, in general, you need to re-write the requests like in the example nginx config above and set the There were quite a few areas in the app that were updated to allow this so there's a good chance I've missed a few changes. If you come across any links or redirects that don't include the extra path component just open a new issue. @poppahorse I tested using pretty much the same nginx config as you posted but I proxied to another Nginx site. I have not yet tested it proxying to docker but I'm hoping it shouldn't be any different. |
thanks @ssddanbrown much appreciated on the quick turnaround, I will hopefully have time to have a play with this later today, will let you know how it goes. |
So I have discovered a few places where the baseUrl is required, I made a PR for the initial login one, but how would you prefer the others? In here? Also how does it save / store the http://domain/docs/project But despite them having their own database, they seem to share those settings. Any ideas? :) |
@poppahorse List any additional url's in the comments of the pull request. I'll go through this weekend and send out another bugfix release to implement them. Application settings are saved in the database and are also cached. Could the cache be shared across both in your setup? By default it's stored in the application |
Will do on the other URLs, thanks :) And cool, that makes sense re: cache. I will have a play! |
I'm currently also struggling the get BookStack running on my RaspberryPi. @poppahorse Is there already a version that can be installed in a subfolder? Many thanks and advance and @ssddanbrown keep up the great work! |
@montharon Thanks! I do not recommend installing BookStack within an actual subfolder as it can expose a lot of files which should not be publically accessible. The latest version (v0.11.1) allows you to install BookStack on a URL sub-path (Such as http://domain.com/bookstack) but this should be done via proxying. I will update the docs with this soon but for now I have created a gist with the nginx config I used to test this. This can be found here. I have commented it up so hopefully you can follow it okay. Will take a little nginx experience. Give me a shout if you have any issues. |
@ssddanbrown According to your suggested gist I changed my config to the following: Unfortunately this does not work either, since every request is automatically redirected to Any suggestions? Many thanks in advance, |
@montharon Have you set the |
@ssddanbrown |
@montharon Okay, It might not be to do with your setup then, Could be #166 at play here. Planning to send another bugfix release out tomorrow to cover that. |
@ssddanbrown Wow, that's good news! Your support and work is much appreciated! |
@montharon I've just published a new release. Give that a try and let me know how it goes. |
@ssddanbrown Many, many thanks to you Dan! Now it works like a charme ;) The auto-generated URL looks like this: Cheers, |
No description provided.
The text was updated successfully, but these errors were encountered: