server {
listen 80;
server_name abc.com www.abc.com;
return 301 https://www.abc.com$request_uri;
}
server {
listen 443;
server_name abc.com;
return 301 https://www.abc.com$request_uri;
}
server {
listen 443 default_server ssl;
server_name www.abc.com;
root "E:/php/PHPTutorial/WWW/geyu/public";
ssl on;
ssl_certificate E:\cert\cert.pem;
ssl_certificate_key E:\cert\cert.key;
ssl_session_timeout 5m;
#ssl_protocols SSLv2 SSLv3 TLSv1; 原来的
ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
index index.html index.htm index.php;
#autoindex on;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}