Re: SSI и мемкеш

Aleksandr Sytar sytar.alex на gmail.com
Вс Июн 13 17:43:51 MSD 2010


13 июня 2010 г. 17:16 пользователь Igor Sysoev <igor на sysoev.ru> написал:
> On Sun, Jun 13, 2010 at 01:58:19PM +0400, Aleksandr Sytar wrote:
>
>> Или я чего-то не понимаю или nginx не отрабатывает error_page при SSI-include
>>
>> server {
>>       listen 80;
>>       server_name name;
>>
>>       charset utf-8;
>>
>>       access_log  /var/log/nginx/test.access.log combined;
>>       access_log  /var/log/nginx/upstream.test.access.log upstream;
>>
>>       root   /var/www/www;
>>
>>       ssi on;
>>
>>       gzip off;
>>
>>       log_subrequest on;
>>
>>       set     $memcached_key  "$uri";
>>
>>       location / {
>>               default_type       text/html;
>>               memcached_pass  memcached;
>>               error_page      404 502 504 = @php;
>>         }
>>
>> # Это ssi-include
>>         location /catalog/get_subcategory_product {
>>               default_type       text/html;
>>               memcached_pass  memcached;
>>               error_page      404 502 504 = @php;
>>         }
>>
>>         location @php {
>>               fastcgi_pass backend;
>>               include fastcgi_params;
>>               fastcgi_param  SCRIPT_FILENAME  $document_root/index.php;
>>               fastcgi_param  PATH_INFO        $uri;
>>               fastcgi_param  REQUEST_URI      $uri;
>>         }
>> }
>>
>> Результат - при инклюде nginx смотрит в мемкеш, ничего там не находит
>> и возвращает 404 игнорирую error_page
>
> Должно работать, нужен отладочный лог.
>

Логи и конфиг сервера в аттаче. В upstream.log собственно видно что
дальше мемкеша nginx не смотрит. Я сначал думал что-то не так с
настройками, но раз через try_files вообще нельзя, то наверно дело не
в настройках.



-- 
Have a nice day
----------- следущая часть -----------
A non-text attachment was scrubbed...
Name: error.log
Type: application/octet-stream
Size: 70983 bytes
Desc: отсутствует
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20100613/469a0af1/attachment-0004.obj>
----------- следущая часть -----------
A non-text attachment was scrubbed...
Name: test.access.log
Type: application/octet-stream
Size: 428 bytes
Desc: отсутствует
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20100613/469a0af1/attachment-0005.obj>
----------- следущая часть -----------
A non-text attachment was scrubbed...
Name: test.conf
Type: application/octet-stream
Size: 3022 bytes
Desc: отсутствует
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20100613/469a0af1/attachment-0006.obj>
----------- следущая часть -----------
A non-text attachment was scrubbed...
Name: upstream.test.access.log
Type: application/octet-stream
Size: 248 bytes
Desc: отсутствует
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20100613/469a0af1/attachment-0007.obj>


Подробная информация о списке рассылки nginx-ru