Re:

neo miritec.com
28 13:10:27 UTC 2011


   .   .
   ,   .
/public/front.php  ,    

   http://domain.com/blabla   ,
 nginx  try files    /public/front.php    
 404,       try files
(/public/front.php)  blabla/  

           try
files (  URI  $1/front.php ,     
/public/front.php)

28  2011. 14:31    <ne  vbart.ru> :
> On Monday 28 November 2011 15:16:29   wrote:
>>  :
>>
>>  location ~ ^(/[^/]+)/ {
>>      try_files $uri $1/front.php /public/front.php =405;
>>      proxy_pass     http://127.0.0.1:8885;
>>      proxy_redirect   off;
>>      proxy_set_header  Host       $host;
>>      proxy_set_header  X-Real-IP    $remote_addr;
>>      proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
>>      client_max_body_size    100m;
>>      client_body_buffer_size  128k;
>>      proxy_connect_timeout   900;
>>      proxy_send_timeout     900;
>>      proxy_read_timeout     900;
>>      proxy_buffer_size     16k;
>>      proxy_buffers       16 64k;
>>      proxy_busy_buffers_size  64k;
>>      proxy_temp_file_write_size 64k;
>>  }
>>
>>
>>   location 
>>
>>   http://domain.com/blabla
>>
>> strace   PID nginx-
>>
>> stat64("/usr/local/nginx/html/public/front.php", 0xbfcc2dc0) = -1
>> ENOENT (No such file or directory)
>> stat64("/usr/local/nginx/html/public/front.php", 0xbfcc2dc0) = -1
>> ENOENT (No such file or directory)
>> stat64("/usr/local/nginx/html/public/front.php", 0xbfcc2dc0) = -1
>> ENOENT (No such file or directory)
>>
>>     ,   404
>>
>>  ,        root
>>
>
>      .  :
> http://nginx.org/ru/docs/http/ngx_http_core_module.html#try_files
>
>    root + /public/front.php ,    .
>   404.
>
>      ,  , , :
>
> location ~ ^(/[^/]+)/ {
>  try_files $uri $1/front.php @front;
>  proxy_pass     http://127.0.0.1:8885;
>  etc...
> }
>
> location @front {
>    proxy_pass     http://127.0.0.1:8885/public/front.php;
>    etc...
> }
>
> ,   -    ?
>
> --
>  
> _______________________________________________
> nginx-ru mailing list
> nginx-ru  nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru


nginx-ru