dani-garcia / vaultwarden

Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs
GNU Affero General Public License v3.0
36.78k stars 1.79k forks source link

All requests give 404 response from Rocket server #886

Closed ctp-tCG closed 4 years ago

ctp-tCG commented 4 years ago

Subject of the issue

Updated image for my docker container and since then every request to the server results in a 404. Can't load the web vault, can't sync clients.

Your environment

Steps to reproduce

Difficult to say, not sure of the cause, but from a working setup all I changed was the docker image to latest armv6 to then have OMV report it unhealthy and all requests 404. Unsure of what version was before, but looking at the releases it was probably 1.13.1 also..? as it was set up initially on Feb 3rd (so is probably the f5916ec build that worked) and the most recent release was Jan 5th, so I don't know what differs in the docker image that would cause the issue.

Relevant logs

/--------------------------------------------------------------------\
|                       Starting Bitwarden_RS                        |
|                      Version 1.13.1-edfdda86                       |
|--------------------------------------------------------------------|
| This is an *unofficial* Bitwarden implementation, DO NOT use the   |
| official channels to report bugs/features, regardless of client.   |
| Report URL: https://github.com/dani-garcia/bitwarden_rs/issues/new |
\--------------------------------------------------------------------/

[2020-03-01 21:15:31][start][INFO] Rocket has launched from http://0.0.0.0:80
[2020-03-01 21:15:41][request][INFO] POST /identity/connect/token
[2020-03-01 21:15:41][response][INFO] 404 Not Found
[2020-03-01 21:17:36][request][INFO] GET /icons/github.com/icon.png
[2020-03-01 21:17:36][response][INFO] 404 Not Found

Every line following is the same [response][INFO] 404 Not Found

jjlin commented 4 years ago

Likely related to https://github.com/dani-garcia/bitwarden_rs/wiki/Using-an-alternate-base-dir. You probably just need to use

ProxyPass /bw/ http://192.168.1.xx:xx/bw/

AFAICT, you can now drop the ProxyPassReverse, but I'm not particularly familiar with using Apache httpd as a reverse proxy.

ctp-tCG commented 4 years ago

That solved it! Was not aware of that being changed, but it's all good now.

I also had

#       RewriteEngine On
#       RewriteCond %{HTTP_REFERER} my\.domain/bw/
#       RewriteCond %{REQUEST_URI} !^/bw/
#       RewriteRule ^/(.*)$ /bw/$1 [R=307,L]

set to have the web vault work in the folder, but have now removed that since it's no longer necessary 👍

Thanks!