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 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办