1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00

Allow changing default NGINX port in unified (#2484)

This commit is contained in:
Vince Grassia
2022-12-08 17:10:49 -05:00
committed by GitHub
parent 328c2ca21c
commit 9ca93381ce
4 changed files with 11 additions and 10 deletions

View File

@ -1,15 +1,15 @@
server {
listen 80 default_server;
#listen [::]:80 default_server;
listen {{{String.Coalesce env.BW_PORT_HTTP "8080"}}} default_server;
#listen [::]:{{{String.Coalesce env.BW_PORT_HTTP "8080"}}} default_server;
server_name {{{String.Coalesce env.BW_DOMAIN "localhost"}}};
{{#if (String.Equal env.BW_ENABLE_SSL "true")}}
return 301 https://{{{String.Coalesce env.BW_DOMAIN "localhost"}}}$request_uri;
return 301 https://{{{String.Coalesce env.BW_DOMAIN "localhost"}}}:{{{String.Coalesce env.BW_PORT_HTTPS "8443"}}}$request_uri;
}
server {
listen 443 ssl http2;
#listen [::]:443 ssl http2;
listen {{{String.Coalesce env.BW_PORT_HTTPS "8443"}}} ssl http2;
#listen [::]:{{{String.Coalesce env.BW_PORT_HTTPS "8443"}}} ssl http2;
server_name {{{String.Coalesce env.BW_DOMAIN "localhost"}}};
ssl_certificate /etc/bitwarden/{{{String.Coalesce env.BW_SSL_CERT "ssl.crt"}}};