mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #2983] No styles on VW or admin page for subfolder using Nginx Proxy Manager #1433
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#1433
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @bitsandbooks on GitHub (Dec 13, 2022).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/2983
Subject of the issue
I'm running the latest (1.23.1, as of this post) version of VW inside a Docker container, and then routing it to the web using Nginx Proxy Manager. Vaultwarden should be accessible at https://subdomain.domain.tld/vw/. I can get to the URL and get "Bitwarden" in return, and I can get to the
/adminpage, but both are completely unstyled, and JavaScripts do not load. Even though the documentation mentions the importance of setting the DOMAIN variable, I'm still getting 404 errors on all static assets.Deployment environment
Here's my Docker Compose file for the container:
Nginx Proxy Manager (which is managing HTTPS certificates) has a Proxy Host and SSL cert set up for subdomain.domain.tld. The Proxy Host is set up with these options:
Under the site's Advanced tab, I have the following:
Expected behaviour
I expect to be able to visit https://subdomain.domain.tld/vw/ and get page that loads static assets (e.g., images and scripts).
Actual behaviour
I get an unstyled site with no Javascript capabilities, and 404 errors on all static assets.
Troubleshooting data
VW Docker logs:
And here are the Errors and Warnings from Firefox's Inspector:
The Nginx error logs contain several entries like this. The "upstream" IP is the IP of the Docker container, so it's pointing to the right place... but notice that it's trying to use HTTPS protocol on port 80. Why?
@BlackDex commented on GitHub (Dec 13, 2022):
What does the nginx, Vaultwarden and browser logs tell you?
@BlackDex commented on GitHub (Dec 13, 2022):
Also, your nginx config is wrong, since one part is using
/vwand the others/vault, that will not work, but in theory should but break the interface.@bitsandbooks commented on GitHub (Dec 13, 2022):
Sorry, that's a victim of my poor anonymizing efforts. Comment updated: results same so far.
@BlackDex commented on GitHub (Dec 13, 2022):
Still need some logs. Either/or Vaultwarden, nginx, browser (F12)
@bitsandbooks commented on GitHub (Dec 14, 2022):
OK, I've added the browser logs, and the VW logs, and some Nginx log entries that look relevant. It's looking for the upstream, and sees it for the content, but not the assets. What am I missing? Do I need to get VW to accept the NPM certs somehow?
@BlackDex commented on GitHub (Dec 14, 2022):
I would start by using a more recent version. You are using
1.23.1which isn't the latest version. That should be1.26.0at the moment.That also makes me wonder if all the compose settings are fully passed on. Try the following.
And check again.
@stefan0xC commented on GitHub (Dec 14, 2022):
You probably have set the scheme of the proxy host to https somewhere. As for the why it seems that because of the
Cache Assetsoption this assets.conf will get included which includes this proxy.conf so the settings for your proxy host$forward_scheme://$server:$portare probably incorrect.@BlackDex commented on GitHub (Dec 14, 2022):
I Also just tested it, and it works just fine using the example from the wiki for nginx.