配置443端口访问时发现一次处于文件下载状态,后来发现竟然是443端口下的服务无法解析php文件,后发现location ~ .php$ 下面写然后转给fast-cgi解析
server {
listen 443 ssl;
server_name www.liuyuanshan.top;
ssl_certificate cert/liuyuanshan.top.pem;
ssl_certificate_key cert/liuyuanshan.top.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# location / {
root html/bbs;
index index.php index.html index.htm;
# }
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}