nginx SSL证书配置 https


server
{
listen 80;
listen 443;
server_name www.xxx.com xxx.com;
root /data/www/xxx;
index index.php index.html index.htm;
ssl on;
ssl_certificate /data/www/ssl/xxx.pem;
ssl_certificate_key /data/www/ssl/xxx.key;
location / {
index index.html index.php;
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last;
}
}

location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_buffers 8 128k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;

include fastcgi_params;

}
}

原文地址:https://www.cnblogs.com/yuzhould/p/15593500.html