HTTPS证书配置
server {
listen 443 ssl;
# 域名,多个以空格分开
server_name shop.baishi360.cn;
# ssl证书地址
ssl_certificate /etc/nginx/conf.d/www.baishi360.cn.pem; # pem文件的路径
ssl_certificate_key /etc/nginx/conf.d/www.baishi360.cn.key; # key文件的路径
# ssl验证相关配置
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 /usr/share/nginx/html/applet_shop/web/web;
index index.php index.html index.htm;
}
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/applet_shop/web/web$fastcgi_script_name;
include fastcgi_params;
}
}