-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Reverse proxy in subdirectory results in http 500 #71
Comments
Can you perhaps share relevant part of your proxy configuration? It should definitely be possible with the API, I'm not 100% sure about the Valut interface and client apps, but I think it should work as well. (as long as you set proper API URL in the client) You might just need to rewrite the URL on the proxy side. Here's how you can do that with nginx. |
The Rocket web server doesn't allow to change the server root directory, at least without modifiyng the code. I also remember seeing somewhere that the web vault is hardcoded to the root directory. So there is a chance that it's not going to work, even with the URL rewriting. The easiest way would be to run the instance under a subdomain, like |
But then other stuff fails. (bootstrap, agular etc.) Not sure how to rewrite that. @dani-garcia |
I wonder if this won't fix your issue with Vault and rewrite? Have you tried to configure Android or some other client with the API in the subdirectory? (and with rewrite in place) |
Hi and thanks for the quick replays. No, I have not tested the API yet. |
I think the only problem with this is that the clients expect the API to be at certain path. The above linked issue will only (maybe) resolve the problem with vault, but if any other apps expect the API to be present at I'm going to close this now as we established, that you can rewrite the URL on the proxy side so there's not much else we need to do here. It probably still won't work but that's due to client-side restriction. Feel free to reopen or create new issue if you think there's anything we can do. |
As long as the subdirectories are proxied to the server, it seems to work. I have no other service that makes calls on For instance, here is the relevant bits of my nginx config after trying it out a bit and tailing the log to find which calls were being generated:
Preliminary testing of creating an account, logging in, creating a new entry, and retrieving that entry with both the Android and web clients was successful. I'd be interested if the devs know of any other functionality that would be worthwhile to test. |
@smacz42, I think this is interesting middle ground where the API itself is still exposed on |
FWIW, after upgrading to 1.14.X the workaround above is no longer necessary. The web application correctly redirects all of the base urls ( |
You still need to separately proxy |
Hallo
Is it possible to run bitwarden_rs behind a reverse proxy in a subdirectoy?
Like
mydomain.tld/bitwarden
?If I try I get errors:
Because rocket things I want to access
/bitwarden
.From other services I'm used to set a http header to let the application know. Something possible here?
Thanks for reading :)
The text was updated successfully, but these errors were encountered: