Not existant files passed to php backend
Reinis Rozitis
r at roze.lv
Wed Aug 20 13:32:47 MSD 2008
Hello,
I have a little problem with 0.7.11 (could be it a bug or config error or is
it expected?).
Nginx passes *.php (matching the regexp) files to the fastcgi backend even
they dont exist and instead of the specified error_page displays "No input
file specified." (which prolly comes from the php).
The response header is correct 404 though but it is still pased over to php
backend :
Here is the difference between requesting a simple file and *.php..
wget -S http://127.0.0.1/notexists.htm
--2008-08-20 12:20:40-- http://127.0.0.1/notexists.htm
Connecting to 127.0.0.1:80 ... connected.
HTTP request sent, awaiting response...
HTTP/1.1 404 Not Found
Server: nginx/0.7.11
Date: Wed, 20 Aug 2008 09:20:40 GMT
Content-Type: text/html
Content-Length: 383
Connection: close
2008-08-20 12:20:40 ERROR 404: Not Found.
wget -S http://127.0.0.1/notexists.php
--2008-08-20 12:20:44-- http://127.0.0.1/notexists.php
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 404 Not Found
Server: nginx/0.7.11
Date: Wed, 20 Aug 2008 09:20:44 GMT
Content-Type: text/html; charset=utf-8
Connection: close
2008-08-20 12:20:44 ERROR 404: Not Found.
The not existant php request doesnt appear also on errorlog.
The config:
..
http {
include mime.types;
default_type application/octet-stream;
access_log off;
sendfile on;
keepalive_timeout 0;
server {
listen 80;
server_name localhost;
root /data/web/root;
index index.php index.htm;
error_page 404 /404.html;
error_page 502 503 504 /404.html;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:1026;
fastcgi_index index.php;
include fastcgi_params;
}
}
}
So is there a workarround to this ?
wbr
Reinis Rozitis
More information about the nginx
mailing list