return 301 https://$host$request_uri;
listen 443 ssl;
ssl_certificate ./conf.d/214184177510235.pem;
ssl_certificate_key ./conf.d/214184177510235.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
server {
listen 80;
server_name xxx.com www.xxx.com;
return 301 https://$host$request_uri;
}
server {
listen 80;
server_name xxx.xxx.com;
location / {
proxy_pass http://127.0.0.1:xxxx;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
server {
listen 443 ssl;
# listen [::]:443 ssl http2 default_server;
server_name xxx.com;
root /usr/share/nginx/html;
ssl_certificate ./conf.d/xxxxxxxxxxxxxx.pem;
ssl_certificate_key ./conf.d/xxxxxxxxxxxxxx.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:xxxx;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
网友评论