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 回答

MYYA
TA貢獻(xiàn)1868條經(jīng)驗(yàn) 獲得超4個贊
lnmp有pathinfo的配置文件。
你把enable-php.conf
這幾個字改為enable-php-pathinfo.conf

呼啦一陣風(fēng)
TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超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 關(guān)注
- 625 瀏覽
添加回答
舉報(bào)
0/150
提交
取消