HTTP/HTTPS 配置
server { listen 80; server_name <域名> localhost; return 301 https://$server_name$request_uri; location ~*^.+$ { root <网站的本地路径>; index index.html; }}server { listen 443; server_name <域名>; ssl on; ssl_certificate cert/<数字_域名>.pem; ssl_certificate_key cert/<数字_域名>.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location ~*^.+$ { root <网站的本地路径>; index index.html; }}