ПРОЕКТЫ 


  АРХИВ 


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: Не работает try_fi les на 0.7.38 - почему?



On Thu, Apr 09, 2009 at 02:42:48PM +0300, Flam Boyant wrote:

> Всем привет!
> 
> FreeBSD 6.2, nginx 0.7.38 из портов. Не могу заставить работать try_files
> 
> Не ругается, но делает вид, что файлов в /mnt/md/ вообще нет - сразу лезет
> на бекенд.
> 
> Конфиг ниже.
> 
> ------
> 
> error_log /var/log/nginx/error.log info;
> 
> pid /var/run/nginx.pid;
> 
> events {
>   worker_connections 4096;
>   kqueue_changes 1024;
> }
> 
> http {
>   include /usr/local/etc/nginx/mime.types;
>   default_type application/octet-stream;
> 
>   log_format main '$remote_addr - $remote_user [$time_local] "$request" $uri
> '
>   '"$status/$upstream_status" $body_bytes_sent '
>   '"$host" $request_time "$upstream_addr/$upstream_response_time"';
> 
>   access_log /var/log/nginx/access.log main;
> 
>   sendfile on;
>   tcp_nopush on;
>   tcp_nodelay on;
>   keepalive_timeout 65 20;
> 
>   client_header_timeout 3m;
>   client_body_timeout 3m;
>   send_timeout 3m;
> 
>   client_header_buffer_size 4k;
>   large_client_header_buffers 4 4k;
> 
>   client_max_body_size 1m;
>   client_body_buffer_size 128k;
> 
>   output_buffers 4 32k;
>   postpone_output 1460;
> 
>   gzip on;
>   gzip_min_length 1024;
>   gzip_buffers 12 32k;
>   gzip_types text/plain application/xml text/css application/x-javascript;
> 
>   proxy_connect_timeout 10;
>   proxy_send_timeout 90;
>   proxy_read_timeout 90;
>   proxy_buffer_size 128k;
>   proxy_buffers 4 128k;
>   proxy_busy_buffers_size 128k;
>   proxy_temp_file_write_size 128k;
>   proxy_ignore_client_abort on;
> 
>   open_file_cache max=10000 inactive=20s;
>   open_file_cache_valid 30s;
>   open_file_cache_min_uses 2;
>   open_file_cache_errors on;
> 
>   server {
>   listen 80 default;
>   server_name хххх;
> 
>   log_not_found on;
> 
>   location / {
>   try_files /mnt/md$uri @root;

-   try_files /mnt/md$uri @root;
+   root      /mnt/md;
+   try_files $uri @root;

>   auth_basic "Restricted";
>   auth_basic_user_file /usr/local/etc/apache22/http.passwd;
>   }
> 
>   location @root {
>   root /ftp/pub;
>   fancyindex on;
>   fancyindex_exact_size on;
>   fancyindex_header /index/header_n.html;
>   fancyindex_footer /index/footer_n.html;
>   auth_basic "Restricted";
>   auth_basic_user_file /usr/local/etc/apache22/http.passwd;
>   }
> 
>   location = /_.gif {
>   empty_gif;
>   }
> 
>   error_page 500 502 503 504 /50x.html;
>   location = /50x.html {
>   root /usr/local/www/nginx;
>   }
> 
>   location ~ /\.ht {
>   deny all;
>   }
>   }
> }

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



 




Copyright © Lexa Software, 1996-2009.