diff options
| -rw-r--r-- | files/nginx_conf.j2 | 28 | ||||
| -rw-r--r-- | files/virtual_host.cfg.lua.j2 | 1 |
2 files changed, 28 insertions, 1 deletions
diff --git a/files/nginx_conf.j2 b/files/nginx_conf.j2 index 3630f78..29cd59d 100644 --- a/files/nginx_conf.j2 +++ b/files/nginx_conf.j2 @@ -29,3 +29,31 @@ server { return 301 https://$host$request_uri; } + +server { + listen 443 ssl; + listen [::]:443 ssl; + + ssl_certificate /etc/prosody/certs/{{ virtual_host }}.crt; + ssl_certificate_key /etc/prosody/certs/{{ virtual_host }}.key; + + server_name {{ virtual_host }}; + + location / { + proxy_pass https://localhost:5281; + proxy_set_header Host "{{ virtual_host }}"; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_buffering off; + tcp_nodelay on; + } +} + +server { + listen 80; + listen [::]:80; + + server_name {{ virtual_host }}; + + return 301 https://$host$request_uri; +} diff --git a/files/virtual_host.cfg.lua.j2 b/files/virtual_host.cfg.lua.j2 index 203d1a8..5710859 100644 --- a/files/virtual_host.cfg.lua.j2 +++ b/files/virtual_host.cfg.lua.j2 @@ -40,7 +40,6 @@ site_apps_show = { {% if not is_transport_server %} allow_user_invites = true -http_external_url = "https://chat.{{ virtual_host }}/" site_name = "{{ virtual_host }}" {% endif %} |
