阿里云,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;

}
}

 

阿里云别忘了还有安全组的配置,加上监听443端口

 

posted @ 2021-11-23 15:41  奥雷连诺  阅读(19)  评论(0编辑  收藏  举报