Hi,
I was wondering if it’s possible to have two hostname certs in BW Self-Hosted?
I have a BW Server for my family, and want to add users from my business, but I don’t necessarily want them to know they’re logging into the “home” setup… Just for consistency sake… I also don’t want to stand up another VM just to host the passwords for work…
Hello @StSanford,
in Principle, yes. To find out for 100%, you need to try it out. Find the bitwarden nginx configuration (should have the name default.conf).
Add an alias for the domain like this:
server_name yourdomain.com yourseconddomain.com;
If you have a proxy, both domains should direct to nginx.
If you are using different tls certificates for each domain, I suggest you read this:
Maybe another solution is to have 2 diffrrents folders et launch indepently 2 dockers services.
You probably have to make change in bwdata/config.yml file (change https port for example)
At last, use proxy_pass in Nginx to redirect according to yours domains.
Hello @StSanford,
I got a working example for you . Check out the latest commit with the following domains:
bitwarden.local, botwarden.local, botwarden.home
Follow the readme.md instructions for it to work properly (5min setup) and Please If you copy it, change globalSettings__installation__id and globalSettings__installation__key.
Put Bitwarden on a separate port and then use Apache or Nginx as a reverse proxy as have site for each hostname with a separate certificate. Have Bitwarden looks for X-Forwarded-For as the Client IP header.
Not too familiar with Nginx (have been meaning to learn for a some time) but I am familiar with other reverse proxies.
You should also be able to set X-Real-IP to forward to IP address of the connecting client and forward that in to Bitwarden for logging.