如何解决lnmp安装包 不支持pathinfo模式

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;
}
HUWWW
浏览 663回答 2
2回答

MYYA

lnmp有pathinfo的配置文件。你把enable-php.conf这几个字改为enable-php-pathinfo.conf

呼啦一阵风

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; }
打开App,查看更多内容
随时随地看视频慕课网APP