проксирование + кеширование. как избавится от "No such file or directory" в логах?
Denis Kot
denis.kot на gmail.com
Ср Янв 27 12:49:22 MSK 2010
Конфиг сейчас такой:
location ~* ^.+\.(jpg|jpeg|gif|gz|zip|flv|rar|wmv|avi|css|swf|png|htc|ico|mpeg|mpg|txt|mp3|mov|js)$
{
expires max;
error_page 404 = @fetch;
}
location @fetch {
internal;
proxy_pass http://domain.ru;
proxy_cache domainru;
proxy_cache_min_uses 1;
proxy_cache_valid 200 24h;
proxy_cache_valid any 0;
}
и в error.log куча таких записей:
2010/01/27 09:44:32 [error] 6074#0: *122838 open()
"/usr/local/etc/nginx/html/images/thumb/d/d6/Wikimedaglia_oro4.png/40px-Wikimedaglia_oro4.png"
failed (2: No such file or directory), client: 1.2.241.175, server:
domain.by, request: "GET
/images/thumb/d/d6/Wikimedaglia_oro4.png/40px-Wikimedaglia_oro4.png
HTTP/1.1", host: "domain.by", referrer:
"http://domain.by/index.php/Main_Page/ru/?setlang=ru"
2010/01/27 09:44:32 [error] 6074#0: *122841 open()
"/usr/local/etc/nginx/html/skins/monobook/headbg.jpg" failed (2: No
such file or directory), client: 1.2.241.175, server: domain.by,
request: "GET /skins/monobook/headbg.jpg HTTP/1.1", host: "domain.by",
referrer: "http://domain.by/index.php/Main_Page/ru/?setlang=ru"
2010/01/27 09:44:32 [error] 6074#0: *122836 open()
"/usr/local/etc/nginx/html/wiki-logo.png" failed (2: No such file or
directory), client: 1.2.241.175, server: domain.by, request: "GET
/wiki-logo.png HTTP/1.1", host: "domain.by", referrer:
"http://domain.by/index.php/Main_Page/ru/?setlang=ru"
2010/01/27 09:44:32 [error] 6074#0: *122841 open()
"/usr/local/etc/nginx/html/images/e/e0/New.gif" failed (2: No such
file or directory), client: 1.2.241.175, server: domain.by, request:
"GET /images/e/e0/New.gif HTTP/1.1", host: "domain.by", referrer:
"http://domain.by/index.php/Main_Page/ru/?setlang=ru"
2010/01/27 09:44:33 [error] 6074#0: *122841 open()
"/usr/local/etc/nginx/html/images/5/5c/Danu.jpg" failed (2: No such
file or directory), client: 1.2.241.175, server: domain.by, request:
"GET /images/5/5c/Danu.jpg HTTP/1.1", host: "domain.by", referrer:
"http://domain.by/index.php/Main_Page/ru/?setlang=ru"
2010/01/27 09:44:33 [error] 6074#0: *122842 open()
"/usr/local/etc/nginx/html/images/thumb/f/f1/400px-Info_icon_001_svg.png/24px-400px-Info_icon_001_svg.png"
failed (2: No such file or directory), client: 1.2.241.175, server:
domain.by, request: "GET
/images/thumb/f/f1/400px-Info_icon_001_svg.png/24px-400px-Info_icon_001_svg.png
HTTP/1.1", host: "domain.by", referrer:
"http://domain.by/index.php/Main_Page/ru/?setlang=ru"
2010/01/27 09:44:33 [error] 6074#0: *122842 open()
"/usr/local/etc/nginx/html/skins/monobook/bullet.gif" failed (2: No
such file or directory), client: 1.2.241.175, server: domain.by,
request: "GET /skins/monobook/bullet.gif HTTP/1.1", host: "domain.by",
referrer: "http://domain.by/index.php/Main_Page/ru/?setlang=ru"
2010/01/27 09:44:33 [error] 6074#0: *122842 open()
"/usr/local/etc/nginx/html/skins/monobook/user.gif" failed (2: No such
file or directory), client: 1.2.241.175, server: domain.by, request:
"GET /skins/monobook/user.gif HTTP/1.1", host: "domain.by", referrer:
"http://domain.by/index.php/Main_Page/ru/?setlang=ru"
Denis Kot
Подробная информация о списке рассылки nginx-ru