Comments (24)
@ssddanbrown Many, many thanks to you Dan! Now it works like a charme ;)
The only thing that I figured out that it's not possible to export a page as PDF file.
The auto-generated URL looks like this:
http://192.168.0.12/docs/books/book01/page/page01/export/pdf
Cheers,
montharon
from bookstack.
Hi,
Sorry for combing back to this late. If I'm honest I'm a little wary of this one. Allowing subdirectory placement of BookStack has the side effect of making it easy to have all the app files within publicly accessible space thus opening it up to all kinds of possible security issues.
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.
from bookstack.
This would be definitely a security flow. The server administrator could use Apache2 aliases for that functionality (as phpMyAdmin is using by default).
from bookstack.
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?
upstream bookstack { server 127.0.0.1:8050; }
server {
location /docs/ {
rewrite ^/docs/$ http://bookstack/docs/ permanent;
rewrite ^/docs/(.*) /$1 break;
proxy_pass http://bookstack/docs/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
from bookstack.
@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.
from bookstack.
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 😃
from bookstack.
@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.
from bookstack.
thanks, that would be great! for the prompt responses 👍
from bookstack.
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 APP_URL
param in the .env
file to your full path.
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.
from bookstack.
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.
from bookstack.
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 Application name
field and settings like primary color? Managed to get 2 copies up and running at:
http://domain/docs/project
http://domain/docs/project2
But despite them having their own database, they seem to share those settings. Any ideas? :)
from bookstack.
@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 storage
folder unless you've set up memcached or redis.
from bookstack.
Will do on the other URLs, thanks :)
And cool, that makes sense re: cache. I will have a play!
from bookstack.
I'm currently also struggling the get BookStack running on my RaspberryPi.
I have other different webfolders (for instance baikal, grav, mediawiki) running on my NGINX server.
Therefore, I will have to use BookStack in it's separate subfolder on my public root.
I have tried various configurations of my NGINX default config to get BookStack running and I also did change the .env setting to http://192.168.0.12/subfolder, but without any luck ;(
@poppahorse
Do you have a running version of your NGINX config for me ;)
I just wanted to have BookStack running in its own subfolder, for instance /bookstack
and redirect all incoming request on that url to /bookstack/public
Is there already a version that can be installed in a subfolder?
I have cloned the latest release from github...
Many thanks and advance and @ssddanbrown keep up the great work!
montharon
from bookstack.
@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.
from bookstack.
@ssddanbrown
Many, many thanks for your quick reply!
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
192.168.0.12/login
Any suggestions?
Many thanks in advance,
montharon
from bookstack.
@montharon Have you set the APP_URL
param in the BookStack .env
file to be your desired url? I forgot to mention that in my post above.
from bookstack.
@ssddanbrown
I have set the APP_URL in the .env file to
http://192.168.0.12/bs
from bookstack.
@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.
from bookstack.
@ssddanbrown Wow, that's good news! Your support and work is much appreciated!
from bookstack.
@montharon I've just published a new release. Give that a try and let me know how it goes.
from bookstack.
Hey @montharon, Glad its now working. That PDF export link looks correct & PDF exports are working okay for me, What's the issue you're getting? Info about viewing error output can be found here.
from bookstack.
@ssddanbrown Hmmmm, set the debugging to true in the .env file and exported a page...
No errors, but a blank page and nothing to download.
Checked the naravel.log also, but found nothing special or unexpected...
from bookstack.
I have just installed BookStack on my pi with a symlink from /opt/BookStack/public to /var/www/html/bookstack. I was able to access the long page, but then I got a ERR_TOO_MANY_REDIRECTS error.
from bookstack.
Related Issues (20)
- FileStorage.php line 40 Operation not permitted HOT 1
- Forms to supply table entries
- possibility to reduce dimensions of scaled images
- Custom Navigation Links and Popup
- Add Scala to list of supported languages in code blocks HOT 2
- Update Bookstack form BookStack v23.12.2 to BookStack v24.02.3 HOT 3
- BookStack https subinformation access show blank site HOT 5
- Popup containing permalink slug doesn't appear after text selection
- An upgrade is required on your databases HOT 2
- How change the domain name, or ip of url already installed HOT 1
- Differences of line-heights for paragraphs in table cells between editor and page view HOT 3
- About restore a backup HOT 2
- Request for help using the Logical Theme system to enable logging in via url parameters HOT 2
- Redirect from /books to /shelves HOT 2
- WYSIWYG: Table cell format handling clears more styles than expected
- Re: Xdebug: [Step Debug] Time-out connecting to debugging client HOT 1
- Error when empty trash HOT 3
- Update `LDAP_USER_FILTER` env option to use new placeholder format HOT 1
- Sticky URL parameters (for keeping iframe/theme settings when navigating) HOT 1
- CVE-2024-2961 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bookstack.