-
Notifications
You must be signed in to change notification settings - Fork 300
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
Add support for custom base URL to play nice with reverse proxy #127
Comments
While that would be a nice to have feature, it seems you could work around your issue if you would use a sub-domain instead of a folder: Another option are URL rewrites I think, but I don't have experience with that. |
Add support for running LinkDing under a custom path to match reverse proxy configurations. Locally tested with nginx+certbot+docker-compose, supports two new optional env variables: LD_CONTEXT_PATH=/linkding LD_CONTEXT_STATIC_PATH=/linkding/static
Hi, I ran into the same issue. I've forked the repo and fixed it for my own use. You can see the changes here: It introduces two environment variables:
This lets me set them to "/linkding" and "/linkding/static" in my docker-compose.yml, and have it all work merrily with the other dozen services I run. Neither workaround mentioned was practical for me, but thank you for all your effort in developing this. If you would like, I can send this as a pull request. It's a fairly minor change, but I am not a Python/Django developer by trade and consider this a bit of a hack. |
@hollispotter Looks like a good start, but it would need some improvements:
If you want to work on those points, feel free to open a PR. |
Is there any follow-up here? |
I'm also interested in a base URL option and am confirming that I haven't been able to find any combination of rewrite rules for Nginx that accommodates it in linkding's current implementation. |
I've been trying to set a reverse proxy for linkding for hours.
I'm using SWAG which includes a Let's Encrypt integration and an NGINX server with a relatively easy to configure templates.
This setting should've been enough:
Note:
linkding
is the container name, and I've been trying to setwww.mysite.com/bm
as the access URL.No matter what I'm doing, the internal linkding server is getting
/bm/
which it doesn't know how to process:Maybe there's a way to circumvent that, but I see that most self hosted apps allow for setting a base URL (which in my case would be
/bm/
) to tell the app where the start point is.The text was updated successfully, but these errors were encountered: