简体   繁体   中英

strange condition file not found nginx with php-fpm

I was working with this config from 2 years without any problem

sudenly I face not found error message from niginx

and its come only when the link has "?" sample

domain/index.php?a=browse&b=category&id=1

if open the normal link, its working (without "php?")

domain/index.php
domain/[any other php file].php

site config (changed user info)

server {
listen *:80;
server_name  domain;
rewrite_log on;
            root   /home/user/public_html/;

location / {
            index  index.php index.html index.htm ;
    }

     location ~*^.+\.jpg|jpeg|gif|css|html|png|js|ico|bmp|zip|rar|txt|pdf|doc)$ {
            root /home/user/public_html/;
            # expires max;
            access_log off;
    }


location ~ ^/.+\.php {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_intercept_errors on;
    include /etc/nginx/fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_script_name;


    }


}

try to use ip change it from

server_name  domain;

to

server_name  serverip;

and test url

serverip/index.php?a=browse&b=category&id=1

you can check it else with ssh comand

wget localhost/index.php?a=browse&b=category&id=1

if work , check any firewall or any services like cloudflare

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM