proxy_store не сохраняет ответ если URL является каталогом

Konstantin G. www-master at arsvest.ru
Fri Jul 18 05:21:37 MSD 2008


nginx version: nginx/0.5.37

Конфиг:

location ~ ^.+/view\d+\.html|/discuss/.*$ {
   root                /opt/HOSTING/www;
   index               index.htm;
   charset             windows-1251;
#  error_log           /var/log/nginx/error.log  crit;
   error_page          403 404 = @dinamic;
}

location @dinamic {
   internal;
   proxy_store          on;
   proxy_store_access   user:rw  group:rw  all:r;
   root                /opt/HOSTING/www;
   index               index.htm;

   proxy_pass          http://127.0.0.1:8888;
   proxy_set_header    Host            $http_host;
   proxy_set_header    X-Real-IP       $remote_addr;
   limit_except  GET POST {
      deny   all;
   }
}

Если запрашивать страницы html (view\d+\.html), то всё работает
как надо. Но когда запрашивается каталог (/discuss/.*), то ничего
не сохраняется и в логах появляются следующие ошибки:


2008/07/18 11:33:37 [error] 16051#0: *300 directory index of
"/opt/HOSTING/www/discuss/" is forbidden, client: 1.1.1.1,
server: www.xxx.ru, request: "GET /discuss/ HTTP/1.1", host:
"www.xxx.ru", referrer: "http://..."

^^ если руками положить в эту папку файл index.htm, то всё работает

2008/07/18 11:33:39 [crit] 16051#0: *300 rename()
"/opt/HOSTING/www/discuss/" failed (20: Not a directory) while
reading upstream, client: 1.1.1.1, server: www.xxx.ru, request:
"GET /discuss/ HTTP/1.1", upstream:
"http://127.0.0.1:8888/discuss/", host: "www.xxx.ru", referrer:
"http://..."

2008/07/18 11:46:34 [error] 21542#0: *313
"/opt/HOSTING/www/discuss/page3/index.htm" is not found (2: No
such file or directory), client: 1.1.1.1, server: www.xxx.ru,
request: "GET /discuss/page3/ HTTP/1.1", host: "www.xxx.ru",
referrer: "http://..."

^^ index.htm он ищет только в случае, если такой папки не существует.

2008/07/18 11:46:35 [crit] 21542#0: *313 rename()
"/opt/HOSTING/www/discuss/page3/" failed (20: Not a directory)
while reading upstream, client: 1.1.1.1, server: www.xxx.ru,
request: "GET /discuss/page3/ HTTP/1.1", upstream:
"http://127.0.0.1:8888/discuss/page3/", host: "www.xxx.ru",
referrer: "http://..."


В чём может быть проблема? Переход на nginx/0.6.x поможет?





More information about the nginx-ru mailing list