Closed stevenmasci closed 2 years ago
Hi @stevenmasci,
The APP_URL
does not dictate/enable the provided url to automatically work. This option is used to tell BookStack what URL has been setup (on the webserver side) to be used.
To get sub-path working you'll need to do some handling on the webserver/proxy side. If you're using a docker setup then proxying the path to the server is common and usually easiest. If attempting to do direct via a single webserver, we have some guidance for this in our docs: https://www.bookstackapp.com/docs/admin/subdirectory-setup/
Thanks again @ssddanbrown
I've managed to get this working with HAProxy by adding reqirep ^([^\ :]*)\ /knowledge/(.*) \1\ /\2
to the HAProxy config.
Hi @stevenmasci,
The
APP_URL
does not dictate/enable the provided url to automatically work. This option is used to tell BookStack what URL has been setup (on the webserver side) to be used.To get sub-path working you'll need to do some handling on the webserver/proxy side. If you're using a docker setup then proxying the path to the server is common and usually easiest. If attempting to do direct via a single webserver, we have some guidance for this in our docs: https://www.bookstackapp.com/docs/admin/subdirectory-setup/
Hi is there any reference of proxying the path, looking forward for your reply
Current setup docker plesk
@CIT-Michael The "NGINX" section of the linked subdirectory setup docs page contains info on this. It also links to an example nginx config for this kind of setup.
Attempted Debugging
Searched GitHub Issues
Describe the Scenario
Hi, I'd like to host BookStack at https://app.mydomain.com/knowledge so I've entered this path as the APP_URL env var, however when I visit the site the styles fail to load and I get page not found, the console logs broken requests (screenshot below).
I can replicate this with the default configuration by changing the APP_URL in docker-compose.yml to
APP_URL: http://localhost:${DEV_PORT:-8080}/knowledge
I've tried running
php artisan bookstack:update-url
to update the APP_URL andphp artisan cache:clear
. I might be miss understanding how the APP_URL environment field works?Thanks for your help.
Exact BookStack Version
v22.04.2
Log Content
PHP Version
PHP 8.1.6
Hosting Environment
Docker on Intel MacBook