docker image behind apache ReverseProxy - an unexpected error has occurred (not logged) #1927

Closed
opened 2025-10-09 17:36:40 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ngoonee on GitHub.

I'm running bitwarden_rs with the following line:-

docker run -d --name bitwarden -e ROCKET_TLS='{certs="/ssl/live/mysite.noip.me/fullchain.pem",key="/ssl/live/mysite.noip.me/privkey.pem"}' -v /etc/letsencrypt/:/ssl/ -v /bw-data/:/data/ -p 54321:80 bitwardenrs/server:latest

Accessing ip_address:54321 no longer works once I add the ROCKET_TLS options (without it, I can access my site at ip_address:54321). This is unexpected behaviour, but is not the main issue I'm raising, I'm just including it in case it is relevant.

My full setup is an apache proxy (also hosts nextcloud). The relevant part of the apache configuration is:-

ProxyPass /bitwarden https://localhost:54321/
ProxyPassRevers /bitwarden https://localhost:54321/
SSLProxyEngine On
ProxyPreserveHost On
ProxyRequests Off

I can access the bitwarden web vault at mysite.noip.me/bitwarden/ appropriately. However trying to login or create account gives me the pop-up red error messagebox saying "An error has occurred. An unexpected error as occurred."

Running 'docker logs -f bitwarden' doesn't show any errors (only the normal keepalives).

Apache logs show the following error:-

[negotiation:error] [pid 626795] [client ::1::43568] AH0690: no acceptable variant: /usr/share/httpd/error/HTTP_NOT_FOUND.html.var, referer: https:/mysite.noip.me/bitwarden/

Googling for that shows that its a MultiViews related error, and I can remove it just be removing the appropriate ErrorDocument lines in my apache config. I'm likely just masking the error though. What else can I check?

EDIT: It seems the problem may be that I can't use a subfolder as mentioned in https://github.com/dani-garcia/bitwarden_rs/issues/241 ?

Originally created by @ngoonee on GitHub. I'm running bitwarden_rs with the following line:- docker run -d --name bitwarden -e ROCKET_TLS='{certs="/ssl/live/mysite.noip.me/fullchain.pem",key="/ssl/live/mysite.noip.me/privkey.pem"}' -v /etc/letsencrypt/:/ssl/ -v /bw-data/:/data/ -p 54321:80 bitwardenrs/server:latest Accessing ip_address:54321 no longer works once I add the ROCKET_TLS options (without it, I can access my site at ip_address:54321). This is unexpected behaviour, but is not the main issue I'm raising, I'm just including it in case it is relevant. My full setup is an apache proxy (also hosts nextcloud). The relevant part of the apache configuration is:- ProxyPass /bitwarden https://localhost:54321/ ProxyPassRevers /bitwarden https://localhost:54321/ SSLProxyEngine On ProxyPreserveHost On ProxyRequests Off I can access the bitwarden web vault at mysite.noip.me/bitwarden/ appropriately. However trying to login or create account gives me the pop-up red error messagebox saying "An error has occurred. An unexpected error as occurred." Running 'docker logs -f bitwarden' doesn't show any errors (only the normal keepalives). Apache logs show the following error:- [negotiation:error] [pid 626795] [client ::1::43568] AH0690: no acceptable variant: /usr/share/httpd/error/HTTP_NOT_FOUND.html.var, referer: https:/mysite.noip.me/bitwarden/ Googling for that shows that its a MultiViews related error, and I can remove it just be removing the appropriate ErrorDocument lines in my apache config. I'm likely just masking the error though. What else can I check? EDIT: It seems the problem may be that I can't use a subfolder as mentioned in https://github.com/dani-garcia/bitwarden_rs/issues/241 ?
Author
Owner

@dani-garcia commented on GitHub:

Closed due to inactivity. Running at a suburl is possible now. https://github.com/dani-garcia/bitwarden_rs/wiki/Using-an-alternate-base-dir

@dani-garcia commented on GitHub: Closed due to inactivity. Running at a suburl is possible now. https://github.com/dani-garcia/bitwarden_rs/wiki/Using-an-alternate-base-dir
Author
Owner

@ngoonee commented on GitHub:

So it doesn't seem this is possible due to #241

My 'workaround' is to use the following (nextcloud is already Alias at /nextcloud/)

ProxyPassMatch ^/nextcloud !
ProxyPass /bitwarden https://localhost:54321/
ProxyPassRevers /bitwarden https://localhost:54321/
SSLProxyEngine On
ProxyPreserveHost On
ProxyRequests Off

This works, login and creation seem okay.

@ngoonee commented on GitHub: So it doesn't seem this is possible due to #241 My 'workaround' is to use the following (nextcloud is already Alias at /nextcloud/) ProxyPassMatch ^/nextcloud ! ProxyPass /bitwarden https://localhost:54321/ ProxyPassRevers /bitwarden https://localhost:54321/ SSLProxyEngine On ProxyPreserveHost On ProxyRequests Off This works, login and creation seem okay.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1927