diff --git a/gateway/conf.d/shellhub.conf b/gateway/conf.d/shellhub.conf index 26c609c3202..600829e3f20 100644 --- a/gateway/conf.d/shellhub.conf +++ b/gateway/conf.d/shellhub.conf @@ -1,6 +1,6 @@ server { {{ if and (bool (env.Getenv "SHELLHUB_AUTO_SSL")) (ne (env.Getenv "SHELLHUB_ENV") "development") -}} - listen 443 ssl{{ if bool (env.Getenv "SHELLHUB_PROXY") }} proxy_protocol{{ end }}; + listen [::]:443 ssl{{ if bool (env.Getenv "SHELLHUB_PROXY") }} proxy_protocol{{ end }}; ssl_certificate /etc/letsencrypt/live/{{ env.Getenv "SHELLHUB_DOMAIN" }}/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/{{ env.Getenv "SHELLHUB_DOMAIN" }}/privkey.pem; @@ -15,7 +15,7 @@ server { ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384"; {{ else -}} - listen 80{{ if bool (env.Getenv "SHELLHUB_PROXY") }} proxy_protocol{{ end }}; + listen [::]:80{{ if bool (env.Getenv "SHELLHUB_PROXY") }} proxy_protocol{{ end }}; {{- end }} {{ if bool (env.Getenv "SHELLHUB_PROXY") }} set_real_ip_from ::/0; @@ -390,7 +390,7 @@ server { {{- $PUBLIC_URL_DOMAIN := or (env.Getenv "SHELLHUB_PUBLIC_URL_DOMAIN") (env.Getenv "SHELLHUB_DOMAIN") }} server { - listen 80; + listen [::]:80; server_name ~^(?<namespace>.+)\.(?<device>.+)\.{{ $PUBLIC_URL_DOMAIN }}$; resolver 127.0.0.11 ipv6=off; @@ -406,7 +406,7 @@ server { {{ if and (bool (env.Getenv "SHELLHUB_AUTO_SSL")) (ne (env.Getenv "SHELLHUB_ENV") "development") -}} server { - listen 80 default_server; + listen [::]:80 default_server; return 301 https://$host$request_uri; }