diff --git a/proxy/default.conf b/proxy/default.conf index 2c4c753..82e0a3b 100644 --- a/proxy/default.conf +++ b/proxy/default.conf @@ -1,13 +1,15 @@ -# web service1 config. server { listen 80; - listen 443 ssl http2; - server_name web; + listen [::]:80; + server_name localhost; + return 301 https://$server_name$request_uri; +} +# web service1 config. +server { + listen 443 ssl http2 default_server; + listen [::]:443 ssl http2 default_server; + server_name localhost; - if ($scheme != "https") { - rewrite ^ https://$host$uri permanent; - } - # Path for SSL config/key/certificate ssl_certificate /etc/ssl/certs/nginx/misp.crt; ssl_certificate_key /etc/ssl/certs/nginx/misp.key;