2024年3月31日发(作者:)
腾讯云Https证书配置
server {
listen 443;
server_name 域名;
ssl on;
root 项目路径;
index ;
ssl_certificate coursecert/证书名.crt;
ssl_certificate_key coursecert/证书名.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 项目路径;
index ;
}
if (!-e $request_filename) {
rewrite ^(.*)$ /?s=$1 last;
break;
}
location ~ [^/].php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/;
fastcgi_index ;
include ;
}
location ~ .*.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ /.ht {
deny all;
}
}


发布评论