[GH-ISSUE #360] standalone executable behind nginx? #206

Closed
opened 2026-03-03 01:26:39 +03:00 by kerem · 3 comments
Owner

Originally created by @Geobert on GitHub (Jan 22, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/360

Hi,

I'm a software engineer but I'm quite weak in the server admin stuff which I only do on my hobby VPS.

That's why I don't have any idea on how to setup bitwarden_rs behind my existing nginx.

I tried to set up ROCKET_ADDRESS=127.0.0.1 and port to 8000, launch bitwarden_rs, and in nginx config:

server {
        listen          80;
        server_name     bw.mydomain.com;
        location / {
          proxy_pass http://127.0.0.1:8000;
          proxy_set_header Host             $host;
          proxy_set_header X-Real-IP        $remote_addr;
          proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
        }
}

but when accessing bw.mydomain.com, it does not work and redirect me to mydomain.com

I'm trying to get it running without HTTPS first to get my certificate through letsencrypt and certbot.

What am I missing?

Regards

EDIT: just tried bw.mydomain.com/admin, it's working… ^^' I'm really a noob

Originally created by @Geobert on GitHub (Jan 22, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/360 Hi, I'm a software engineer but I'm quite weak in the server admin stuff which I only do on my hobby VPS. That's why I don't have any idea on how to setup bitwarden_rs behind my existing nginx. I tried to set up `ROCKET_ADDRESS=127.0.0.1` and port to 8000, launch bitwarden_rs, and in nginx config: ``` server { listen 80; server_name bw.mydomain.com; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ``` but when accessing bw.mydomain.com, it does not work and redirect me to mydomain.com I'm trying to get it running without HTTPS first to get my certificate through letsencrypt and certbot. What am I missing? Regards EDIT: just tried bw.mydomain.com/admin, it's working… ^^' I'm really a noob
kerem closed this issue 2026-03-03 01:26:40 +03:00
Author
Owner

@mprasil commented on GitHub (Jan 23, 2019):

Is it possible you have a redirect from http to https that is doing the redirect to top domain?

<!-- gh-comment-id:456725895 --> @mprasil commented on GitHub (Jan 23, 2019): Is it possible you have a redirect from http to https that is doing the redirect to top domain?
Author
Owner

@Geobert commented on GitHub (Jan 23, 2019):

I have but for the top domain only, not for bw.mydomain.com
Maybe the rules from top domain are overriding?

<!-- gh-comment-id:456737519 --> @Geobert commented on GitHub (Jan 23, 2019): I have but for the top domain only, not for bw.mydomain.com Maybe the rules from top domain are overriding?
Author
Owner

@mprasil commented on GitHub (Jan 23, 2019):

Sounds like that yeah. bitwarden_rs doesn't do any redirects on its own.

<!-- gh-comment-id:456739432 --> @mprasil commented on GitHub (Jan 23, 2019): Sounds like that yeah. bitwarden_rs doesn't do any redirects on its own.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#206
No description provided.