sni_forward: more fixes for server block that should listen to 127.0.0.1 instead of 0.0.0.0

This commit is contained in:
Alexandre Aubin 2023-08-12 11:23:38 +02:00
parent 5c7518bf33
commit 7a77083a8d
2 changed files with 10 additions and 0 deletions

View file

@ -86,8 +86,13 @@ server {
{% if xmpp_enabled == "True" %} {% if xmpp_enabled == "True" %}
# vhost dedicated to XMPP http_upload # vhost dedicated to XMPP http_upload
server { server {
{% if sni_forward_enabled != "True" %}
listen 443 ssl http2; listen 443 ssl http2;
listen [::]:443 ssl http2; listen [::]:443 ssl http2;
{% else %}
listen 127.0.0.1:443 ssl http2;
{% endif %}
server_name xmpp-upload.{{ domain }}; server_name xmpp-upload.{{ domain }};
root /dev/null; root /dev/null;

View file

@ -6,8 +6,13 @@ server {
} }
server { server {
{% if sni_forward_enabled != "True" %}
listen 443 ssl http2 default_server; listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server; listen [::]:443 ssl http2 default_server;
{% else %}
listen 127.0.0.1:443 ssl http2 default_server;
{% endif %}
include /etc/nginx/conf.d/security.conf.inc; include /etc/nginx/conf.d/security.conf.inc;