dongyutan1703 2016-10-06 20:56
浏览 22
已采纳

用php-fpm找不到奇怪的条件文件nginx

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;


    }


}
  • 写回答

1条回答 默认 最新

  • dongyue6199 2016-10-07 07:35
    关注

    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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)