mirror of
https://github.com/plankanban/planka.git
synced 2026-02-25 11:21:03 +03:00
apache reverse proxy in subdirectory not working #36
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @newhinton on GitHub (Oct 4, 2020).
I use a simple apache vhost to host planka in a subdirectory:
example.com/todo
i used docker compose, and set BASE_URL to 'example.com/todo'
i can load the main planka app (the html loads, but scripts still reference 'example.com'). It seems if a subdirectory in base_url is not used. Is there a way to make this work?
Apache vhost config: (the relevant part)
@meltyshev commented on GitHub (Oct 5, 2020):
Hi! Currently, subdirectories are not supported, but you can modify one file to achieve this: add a
"homepage": "/todo"setting to theclient/package.json. Thendocker build -t planka .in the root folder. Now you can change the image indocker-compose.ymlfrommeltyshev/planka:latesttoplanka.@newhinton commented on GitHub (Oct 5, 2020):
Thank you for your answer! It worked, as the scripts and resources are loading, however, i just get a 'page not found' message. It seems that sails now answers the requests as expected, but internally the routes are not updated.
Is this a simple fix like the package.json edit, or should i wait until it is properly supported?
@meltyshev commented on GitHub (Oct 5, 2020):
Can you try to change the line in
client/src/history.jsfromexport default createBrowserHistory();toexport default createBrowserHistory({ pathname: '/todo' });. Also, there could be some issues with socket connection, if that happens - try to change the line inDockerfilefromRUN npm run buildtoRUN REACT_APP_SERVER_BASE_URL=/todo npm run build.@newhinton commented on GitHub (Oct 8, 2020):
Thank you for your help, but sadly i couldn't get it to work, but it could very well be that i made a mistake with the proxy and your directions were perfectly fine.
However, for anyone that is interested in running planka behind a proxy on '/', this are the proxy settings you need: