diff --git a/appmgr/src/net/nginx-standard.conf.template b/appmgr/src/net/nginx-standard.conf.template index 499e5827b..1cf097f50 100644 --- a/appmgr/src/net/nginx-standard.conf.template +++ b/appmgr/src/net/nginx-standard.conf.template @@ -7,7 +7,7 @@ map $http_x_forwarded_proto $real_proto {{ }} server {{ listen 443 ssl; - server_name {hostname}.local; + server_name .{hostname}.local; ssl_certificate /root/appmgr/apps/{app_id}/cert-local.fullchain.crt.pem; ssl_certificate_key /root/appmgr/apps/{app_id}/cert-local.key.pem; location / {{ @@ -23,6 +23,6 @@ server {{ }} server {{ listen 80; - server_name {hostname}.local; + server_name .{hostname}.local; return 301 https://$host$request_uri; }} diff --git a/appmgr/src/net/nginx.conf.template b/appmgr/src/net/nginx.conf.template index df6180abb..86d80619b 100644 --- a/appmgr/src/net/nginx.conf.template +++ b/appmgr/src/net/nginx.conf.template @@ -1,6 +1,7 @@ server {{ listen {listen_args}; - server_name {hostname}.local; + listen [::]:{listen_args_ipv6}; + server_name .{hostname}.local; {ssl_certificate_line} {ssl_certificate_key_line} location / {{ diff --git a/appmgr/src/net/nginx.rs b/appmgr/src/net/nginx.rs index ec94a2a45..77620f330 100644 --- a/appmgr/src/net/nginx.rs +++ b/appmgr/src/net/nginx.rs @@ -154,6 +154,7 @@ impl NginxControllerInner { format!( include_str!("nginx.conf.template"), listen_args = listen_args, + listen_args_ipv6 = listen_args, hostname = meta.dns_base, ssl_certificate_line = ssl_certificate_line, ssl_certificate_key_line = ssl_certificate_key_line, diff --git a/appmgr/src/nginx/main-ui.conf.template b/appmgr/src/nginx/main-ui.conf.template index 3d8e7cf87..3a21ae5c1 100644 --- a/appmgr/src/nginx/main-ui.conf.template +++ b/appmgr/src/nginx/main-ui.conf.template @@ -8,7 +8,7 @@ server {{ index index.html index.htm index.nginx-debian.html; - server_name {lan_hostname}; + server_name .{lan_hostname}; proxy_buffering off; proxy_request_buffering off; @@ -25,7 +25,7 @@ server {{ proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; }} - + location /public/ {{ proxy_pass http://127.0.0.1:5961/; }} @@ -41,7 +41,7 @@ server {{ server {{ listen 80; listen [::]:80; - server_name {lan_hostname}; + server_name .{lan_hostname}; return 301 https://$host$request_uri; }} server {{ @@ -54,7 +54,7 @@ server {{ index index.html index.htm index.nginx-debian.html; - server_name {tor_hostname}; + server_name .{tor_hostname}; proxy_buffering off; proxy_request_buffering off; @@ -71,7 +71,7 @@ server {{ proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; }} - + location /public/ {{ proxy_pass http://127.0.0.1:5961/; }} @@ -87,6 +87,6 @@ server {{ server {{ listen 443 ssl; listen [::]:443; - server_name {tor_hostname}; + server_name .{tor_hostname}; return 301 http://$host$request_uri; }} \ No newline at end of file