server {
#默认为 listen 80 ; 如果配置证书 则改为 443 ssl;
listen 443 ssl;
server_name XXX.com;
#以下两行为https证书文件
ssl_certificate /etc/nginx/cert/XX.com.pem;
ssl_certificate_key /etc/nginx/cert/XX.com.key;
location /
{
root /home/www/ceshi;
index index.php index.html index.htm;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ \.php$ {
root /home/www/ceshi;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 404 /404.html;
location = /40x.html {
} error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
error_log /var/log/nginx/XX.com.error.log;
}
配置nginx下vhost文件conf文件
最新推荐文章于 2025-03-30 20:42:40 发布