Hello.
I’m trying to set up Bitwarden on existing nginx server. Connection through HTTP is ok. But on HTTPS i’m getting ERR_CONNECTION_REFUSED. What’s wrong with my confs?
What i’ve changed from default configuration:
1.Changed http and https ports in config.yml file.
2.Turned off ssl in config.yml because nginx with ssl already exists.
3. Added two server blocks to nginx configuration file.(see below).
Thanks for help.
server {
listen 443 ssl;
server_name bitwarden.johnnyluger.tech;
ssl_certificate /root/.acme.sh/johnnyluger.tech/fullchain.cer; # use fullchain.cer for complete certificate;
ssl_certificate_key /root/.acme.sh/johnnyluger.tech/johnnyluger.tech.key; # keep this private as much as possible;
location / {
proxy_pass http://localhost:44399/;
}
}
server {
if ($host = bitwarden.johnnyluger.tech) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80;
server_name bitwarden.johnnyluger.tech;
return 404; # managed by Certbot
}
And config.yml changes
# Docker compose file port mapping for HTTP. Leave empty to remove the port mapping.
# Learn more: https://docs.docker.com/compose/compose-file/#ports
http_port: 999
#
# Docker compose file port mapping for HTTPS. Leave empty to remove the port mapping.
# Learn more: https://docs.docker.com/compose/compose-file/#ports
https_port: 44399
#
# Docker compose file version. Leave empty for default.
# Learn more: https://docs.docker.com/compose/compose-file/compose-versioning/
compose_version:
#
# Configure Nginx for Captcha.
captcha: false
#
# Configure Nginx for SSL.
ssl: false