server { listen 80; listen [::]:80; server_name www.scnict.com; rewrite ^(.*) https://$server_name$1 permanent; } server { listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; server_name www.scnict.com; root /var/www/html; ssl_certificate "cert/scnict.com.pem"; ssl_certificate_key "cert/scnict.com.key"; ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location ~ \.*gz { add_header Content-Encoding 'gzip'; } location /api/ { proxy_pass http://127.0.0.1:7200/; } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } }