server {
listen 192.168.1.2:80;
server_name site.net www.site.net;
server_tokens off;
location ~ /incl/ {
deny all;
break;
}
location ~ .php$ {
fastcgi_pass unix:/var/run/php-cgi/fcgi-php5.3.socket-1;
fastcgi_param SCRIPT_FILENAME /var/www/site.net/htdocs/$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location / {
autoindex off;
#rewrite ^/(.*)$ /entrypoint.php?file=$1 break;
#error_page 404 = /entrypoint.php?_404&path=$uri&$args;
if (!-e $request_filename) {
rewrite ^(.+)$ /entrypoint.php last;
}
}
location ~ /\.+ {
deny all;
}
access_log /var/www/site.net/log/access.log main;
error_log /var/www/site.net/log/error.log info;
root /var/www/site.net/htdocs;
}
он просто игнорирует строку статуса[root@devel ~]# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /test.php HTTP/1.1
Host: devel
HTTP/1.1 200 OK
Server: nginx/0.7.57
Date: Sat, 04 Dec 2010 04:23:59 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.3.4RC2-dev
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log debug ;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile off;
tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip off;
gzip_comp_level 3;
gzip_types application/x-javascript text/plain application/xml;
resolver 127.0.0.1;
server {
listen 80;
server_name devel;
location /pics {
autoindex on;
root /www;
index index.html index.htm;
}
location / {
root /www;
index index.html index.htm index.php;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php {
fastcgi_pass unix:/var/run/php-fcgi.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /www$fastcgi_script_name;
}
}
}
header("Status: 400 Bad Request"); хотя бы решает проблему, спасибоheader("HTTP/1.0 400 Bad Request"); - не попадает в список хедеров, но мой nginx видит его все равно как 400. Версия php 5.3.3. Чего-то я нихрена не понимаю(((