location + expires

Andrey Riabushenko cdome at bk.ru
Sun Oct 19 15:46:30 MSD 2008


Правильно так

server {
         listen   80;
         server_name i1.site.ru i2.site.ru;
         expires 7d;

        access_log  off;
  	root   /var/www/images;
        index  index.html index.htm;
} 


В сообщении от Sunday 19 October 2008 12:48:55 kisulja2000 написал(а):
> Есть настройка
>
> server {
>         listen   80;
>         server_name i1.site.ru i2.site.ru;
>         expires 7d;
>
>         access_log  off;
>
>         location / {
>                 root   /var/www/images;
>                 index  index.html index.htm;
>         }
> ...
> }
>
> хочу сделать
>
> location /path1/path2 {
>     expires 1h;
> }
>
> картинки перестают отдаваться. лог не смотрел. может быть внитри второго
> Location нужно обязательно root прописать?
>
> С уважением,
>  Serguei V. Melekhov




More information about the nginx-ru mailing list