RE: Nginx + PHP fcgi / Кидает 404

Бир Артур abir at rbc.ru
Mon Mar 5 18:12:30 MSK 2007


bash-2.05b# tail -f /logs/xxx.ru/access_log | grep chat
80.68.252.11 - - [05/Mar/2007:18:08:39 +0600] GET /chat-xxx.php HTTP/1.1 / -
"499" 0 "http://xxx.ru/index.php" "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; SV1; MyIE2; MRA 4.8 (build 01709))" "-"
80.68.252.11 - - [05/Mar/2007:18:08:39 +0600] GET /chat-xxx.php HTTP/1.1 / -
"404" 529 "http://xxx.ru/index.php" "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; SV1; MyIE2; MRA 4.8 (build 01709))" "-"
80.68.252.11 - - [05/Mar/2007:18:08:42 +0600] GET /chat-xxx.php HTTP/1.1 / -
"404" 529 "http://xxx.ru/index.php" "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; SV1; MyIE2; MRA 4.8 (build 01709))" "-"
80.68.252.11 - - [05/Mar/2007:18:09:08 +0600] GET /chat-xxx.php HTTP/1.1 / -
"200" 47539 "http://xxx.ru/index.php" "Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; SV1; MyIE2; MRA 4.8 (build 01709))" "-"

Добавил log_format, после HTTP/1.1 за / должен писаться query_string. Но,
как мы видим, он отсутствует. В общем, у меня через раз php страницы
грузятся. Либо 404 либо чуть тормознуто грузятся.

> -----Original Message-----
> From: owner-nginx-ru at mail.sysoev.ru [mailto:owner-nginx-ru at mail.sysoev.ru]
> On Behalf Of Дмитрий Леоненко
> Sent: Monday, March 05, 2007 5:00 PM
> To: nginx-ru at sysoev.ru
> Subject: Re: Nginx + PHP fcgi / Кидает 404
> 
> Ну сразу сложно мне сказать, в чем может заключаться такой удивительный
> глюк, я такого не встречал на практике. А можно ли увидеть лог, где так же
> присутствует QUERY_STRING? То есть полный GET и параметры GET'а. Я
> спрашиваю, т.к. у Вас есть rewrite.
> Если можно - дайте лог с QUERY_STRING, где 404 и где все нормально.
> 
> 
> 2007/3/5, Бир Артур <abir at rbc.ru>:
> 
> 
> 	81.195.47.130 <http://81.195.47.130>  - - [05/Mar/2007:16:30:12
> +0600] "GET /shoutbox.php HTTP/1.1"
> 	404 529 "http://***.ru/chat.php" "Mozilla/4.0 (compatible; MSIE 6.0;
> Windows
> 	NT 5.1; SV1)"
> 	Но файл такой есть.
> 	Конфиг nginx'a:
> 
> 
> 	# nginx.conf
> 
> 	user  www;
> 	worker_processes  3;
> 
> 	pid        /var/run/nginx.pid;
> 
> 	events {
> 	    worker_connections  4096;
> 	    use kqueue;
> 	}
> 
> 	http {
> 	    include       mime.types;
> 	    default_type  application/octet-stream;
> 	    sendfile        on;
> 	    tcp_nopush     on;
> 
> 	    keepalive_timeout  15;
> 
> 	    #gzip  on;
> 
> 	    Server {
> 
> 	....
> 
> 	        location ~* ^.+\.(jpg|jpeg|gif|html|css|js|png)$ {
> 	            root        $srv_root;
> 	            index       index.html index.htm;
> 	            expires     30d;
> 	            access_log  off;
> 	        }
> 
> 	        rewrite ^/(.+)\.php/([.&]*)\.torrent$
> /$1.php?pathinfo=/$2.torrent
> 	permanent;
> 	        rewrite ^/(.+)\.php/(.*)$ /$1.php?pathinfo=/$2&$query_string
> 	last;
> 	        location / {
> 	            root                $srv_root;
> 	            index               index.php;
> 	            fastcgi_pass        unix:/tmp/php- fastcgi.sock;
> 	            include             fastcgi_params_all;
> 	        }
> 
> 	#fastcgi_params_all
> 
> 	fastcgi_index index.php;
> 	fastcgi_connect_timeout 5;
> 	fastcgi_send_timeout 300;
> 	fastcgi_read_timeout 300;
> 	fastcgi_buffer_size 32k;
> 	fastcgi_buffers 4 32k;
> 	fastcgi_busy_buffers_size 32k;
> 	fastcgi_temp_file_write_size 32k;
> 
> 	fastcgi_param   DOCUMENT_ROOT   $srv_root;
> 	fastcgi_param   SCRIPT_FILENAME $srv_root$fastcgi_script_name;
> 	fastcgi_param   PATH_TRANSLATED $srv_root$fastcgi_script_name;
> 
> 	fastcgi_param   SCRIPT_NAME     $fastcgi_script_name;
> 	fastcgi_param   QUERY_STRING    $query_string;
> 
> 	fastcgi_param  REQUEST_METHOD   $request_method;
> 	fastcgi_param  CONTENT_TYPE     $content_type;
> 	fastcgi_param  CONTENT_LENGTH   $content_length;
> 
> 	fastcgi_param   REDIRECT_STATUS 200;
> 	fastcgi_param   SERVER_ADDR     $server_addr;
> 	fastcgi_param   SERVER_PORT     $server_port;
> 	fastcgi_param   SERVER_PROTOCOL $server_protocol;
> 	fastcgi_param   SERVER_SOFTWARE "uks v-0.1.3";
> 	fastcgi_param   GATEWAY_INTERFACE "CGI/1.1";
> 	fastcgi_param   SERVER_NAME     $server_name;
> 	fastcgi_param   REQUEST_URI     $request_uri;
> 	fastcgi_param   REMOTE_ADDR     $remote_addr;
> 	fastcgi_param   REMOTE_PORT     $remote_port;
> 
> 	> -----Original Message-----
> 	> From: owner-nginx-ru at mail.sysoev.ru <mailto:owner-nginx-
> ru at mail.sysoev.ru>  [mailto:owner-nginx-ru at mail.sysoev.ru]
> 	> On Behalf Of Дмитрий Леоненко
> 	> Sent: Monday, March 05, 2007 3:07 PM
> 	> To: nginx-ru at sysoev.ru <mailto:nginx-ru at sysoev.ru>
> 	> Subject: Re: Nginx + PHP fcgi / Кидает 404
> 	>
> 	> В логе что при этом появляется?
> 	>
> 	>
> 	> 05.03.07, Бир Артур < abir at rbc.ru <mailto:abir at rbc.ru> >
> написал(а):
> 	>
> 	>       Добрый день господа!
> 	>
> 	>       При настройке связки PHP FCGI + Nginx, время от времени, при
> 	> обращении к
> 	>       некоторым скриптам, вылетает 404 ошибка. Если обновить -
> страничка
> 	> опять
> 	>       отображается. Кто ни будь сталкивался с подобным?
> 	>
> 	>
> 	>
> 
> 
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3066 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20070305/99c0a004/attachment.bin>


More information about the nginx-ru mailing list