server { listen 443;
server_name demo.shengruijt25.com;
ssl on;
root html;
index index.html index.htm;
ssl_certificate /data/website/demo_373/cert/demo.pem;
ssl_certificate_key /data/website/demo_373/cert/demo.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 /data/website/demo_373;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
access_log /data/website/log/demo_373.log main;
location ~ \.php$ {
root /data/website/demo_373;
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
注意: crt或者cer证书可以直接改后缀名为pem证书