vhost 下我的配置文件
server
{
listen 80;
#listen [::]:80;
server_name c.ibs-bj.com ;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/c.ibs-bj.com;
include other.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
access_log /home/wwwlogs/c.ibs-bj.com.log;
}
2 回答
呼啦一阵风
TA贡献1802条经验 获得超6个赞
Nginx配置PATHINFO
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
- 2 回答
- 0 关注
- 562 浏览
添加回答
举报
0/150
提交
取消