ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Взорван мозг. Ниче го не понимаю



On Tue, Aug 26, 2008 at 02:50:23PM +0600, Vitalij L. Fadeev wrote:

> 
> 
> -----Original Message-----
> From: Igor Sysoev <is@xxxxxxxxxxxxx>
> To: nginx-ru@xxxxxxxxx
> Date: Tue, 26 Aug 2008 12:33:17 +0400
> Subject: Re: Взорван мозг. Ничего не понимаю
> 
> > On Tue, Aug 26, 2008 at 03:24:19PM +0700, Vitalij L. Fadeev wrote:
> > 
> > > Добрый день!
> > > Объясните, что же я делаю не так?
> > > 
> > > вот конфиг:
> > > 
> > > user  nobody;
> > > worker_processes  3;
> > > 
> > > error_log  /var/log/nginx/error.log  error;
> > > #access_log /var/log/nginx/access.log combined;
> > > 
> > > #pid        logs/nginx.pid;
> > > 
> > > events {
> > >     worker_connections  2048;
> > >     use kqueue;
> > > }
> > > 
> > > 
> > > http {
> > >     include       mime.types;
> > >     default_type  application/octet-stream;
> > > 
> > >     access_log  /var/log/nginx/access.log  combined;
> > > 
> > >     sendfile        on;
> > >     tcp_nopush     on;
> > >     proxy_buffers     8  32k;
> > >     proxy_buffering   on;
> > > 
> > >     #keepalive_timeout  0;
> > >     keepalive_timeout  65;
> > >     gzip             on;
> > >     gzip_proxied     expired no-cache no-store private auth;
> > >     gzip_types       text/plain application/xml;
> > > 
> > >     #include /usr/local/etc/nginx/vhosts/*;
> > > 
> > >     server {
> > >         listen       80;
> > >         server_name  inskaya.ru www.inskaya.ru inskaya.loc 
> > > www.inskaya.loc;
> > > 
> > >         #charset utf8;
> > > 
> > >         error_log   /var/log/nginx/www.inskaya.ru/error.log error;
> > >         access_log  /var/log/nginx/www.inskaya.ru/access.log  combined;
> > > 
> > > 
> > >         location / {
> > >             root   /usr/local/www/www.inskaya.ru;
> > >             index  index.php;
> > > 
> > >         location ~ .php$ {
> > >          fastcgi_pass   unix:/tmp/php-fcgi.sock;
> > >          fastcgi_index  index.php;
> > >          fastcgi_param  SCRIPT_FILENAME  
> > > /usr/local/www/www.inskaya.ru$fastcgi_script_name;
> > >          include        fastcgi_params;
> > >         }
> > >         }
> > > 
> > >         location /flyspray {
> > >             root /usr/local/www/flyspray;
> > 
> > -             root /usr/local/www/flyspray;
> > +             root /usr/local/www;
> > 
> > Но должен предупредить, что использование вложенных location'ов на данный
> > момент - недокументированная вещь и мной полностью не тестировалась.
> 
> www# diff -u nginx.conf.old nginx.conf
> --- nginx.conf.old      2008-08-26 15:47:35.000000000 +0700
> +++ nginx.conf  2008-08-26 15:48:05.000000000 +0700
> @@ -54,7 +54,7 @@
>         }
> 
>         location /flyspray {
> -           root /usr/local/www/flyspray;
> +           root /usr/local/www;
>             index index.php;
> 
>         location ~ .php$ {
> 
> та же пежня...
> самое интересное что на другом хосте это работает.
> но там нету jail

        location /flyspray {
-           root /usr/local/www/flyspray;
+           root /usr/local/www;
            index index.php;

            location ~ .php$ {
-                fastcgi_param  SCRIPT_FILENAME  
/usr/local/www/flyspray$fastcgi_script_name;
+                fastcgi_param  SCRIPT_FILENAME  
$document_root$fastcgi_script_name;


> > 
> > >             index index.php;
> > > 
> > >         location ~ .php$ {
> > >          fastcgi_pass   unix:/tmp/php-fcgi.sock;
> > >          fastcgi_index  index.php;
> > >          fastcgi_param  SCRIPT_FILENAME  
> > > /usr/local/www/flyspray$fastcgi_script_name;
> > >          include        fastcgi_params;
> > >         }
> > >         }
> > > 
> > >         #error_page  404              /404.html;
> > > 
> > >         # redirect server error pages to the static page /50x.html
> > >         #
> > >         error_page   500 502 503 504  /50x.html;
> > >         location = /50x.html {
> > >             root   /usr/local/www/nginx-dist;
> > >         }
> > > 
> > >         # deny access to .htaccess files, if Apache's document root
> > >         # concurs with nginx's one
> > >         #
> > >         location ~ /\.ht {
> > >             deny  all;
> > >         }
> > >     }
> > > 
> > >     server {
> > >         listen       80;
> > >         server_name auto.eseek.ru ugnali.org www.ugnali.org;
> > > 
> > >         #charset utf8;
> > > 
> > >         error_log   /var/log/nginx/www.ugnali.org/error.log error;
> > >         access_log  /var/log/nginx/www.ugnali.org/access.log  combined;
> > > 
> > > 
> > >         location / {
> > >             root   /usr/local/www/auto.eseek.ru;
> > >             index  index.html;
> > >         }
> > > 
> > >         location = /closed/ {
> > >             deny all;
> > >         }
> > >         location = /new/ {
> > >             deny all;
> > >         }
> > > 
> > >         #error_page  404              /404.html;
> > > 
> > >         # redirect server error pages to the static page /50x.html
> > >         #
> > >         error_page   500 502 503 504  /50x.html;
> > >         location = /50x.html {
> > >             root   /usr/local/www/nginx-dist;
> > >         }
> > > 
> > >         # deny access to .htaccess files, if Apache's document root
> > >         # concurs with nginx's one
> > >         #
> > >         location ~ /\.ht {
> > >             deny  all;
> > >         }
> > >     }
> > > }
> > > 
> > > 
> > > обращаюсь к http://www.inskaya.ru/flyspray - получаю 404 а в логах:
> > > ==> error.log <==
> > > 2008/08/26 15:20:37 [error] 89680#0: *10 open() 
> > > "/usr/local/www/flyspray/flyspray" failed (2: No such file or directory), 
> > > client: 81.16.137.6, server: inskaya.ru, request: "GET /flyspray 
> > > HTTP/1.0", host: "www.inskaya.ru"
> > > ==> access.log <==
> > > 81.16.137.6 - - [26/Aug/2008:15:20:37 +0700] "GET /flyspray HTTP/1.0" 404 
> > > 529 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; MRA 
> > > 5.1 (build 02243); .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 
> > > 1.1.4322; .NET CLR 3.0.04506.648)"
> > > 
> > > обращаюсь к http://www.ugnali.org/closed/index.php получаю в логах:
> > > ==> access.log <==
> > > 81.16.137.6 - - [26/Aug/2008:15:23:48 +0700] "GET /closed/index.php 
> > > HTTP/1.0" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; 
> > > WOW64; MRA 5.1 (build 02243); .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; 
> > > .NET CLR 1.1.4322; .NET CLR 3.0.04506.648)"
> > > 
> > > 
> > > Вставьте пожалуйста руки на место!
> > 
> > -- 
> > Игорь Сысоев
> > http://sysoev.ru
> > 
> 

-- 
Игорь Сысоев
http://sysoev.ru



 




Copyright © Lexa Software, 1996-2009.