簡體   English   中英

找不到帶有php-fpm的nginx的奇怪條件文件

[英]strange condition file not found nginx with php-fpm

我從2年開始使用此配置,沒有任何問題

突然我遇到了找不到來自niginx的錯誤消息

並且僅當鏈接具有“?”時才出現 樣品

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

如果打開普通鏈接,則可以正常工作(不帶“ php?”)

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

站點配置(更改的用戶信息)

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;


    }


}

嘗試使用ip將其更改為

server_name  domain;

server_name  serverip;

並測試網址

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

你可以用ssh comand來檢查它

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

如果可行,請檢查防火牆或cloudflare之類的服務

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM