Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: location + error_page + url prefixes
- To: nginx-ru@xxxxxxxxx
- Subject: Re: location + error_page + url prefixes
- From: Maxim Yemelyanov <maxim4d@xxxxxxxxx>
- Date: Sat, 31 Jan 2009 01:36:27 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=VvzCyEsQIOECCW62Yc7b8VIehAHnUwWQni9EhPHJmtw=; b=Mxkn02jelv2OOWTM31Muo1wTKn9x9EZ67kbhk5zy3rOCN1PMauCMSFtoP2COMYlv2n iSBUfDFg5zXDte/TbKSMzdZHc+ffCLPBGEXwCzC8nl2qPmf436XaNdMA1O3RG3wtJK8o IJVLxbuYeSIXeNUyeVK8TG1/yCIuQshF+pr+k=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=dhu+LuUry/4mrWKx/LjCTHv/u2iO25WVBn0h/92PqQStWy4blVrCp/H66V77+8r/eI 0FYIIMjfKUS+GZZ/dpe7O9oYoG7wQ0jIyyADh3a3sXIb3NsbxqqHwIqF+0+TgMiBjbOY wJOsFZLzz939VKBrPLQdHqUjay6O6hxYK7RGc=
- In-reply-to: <20090130205448.GC88973@xxxxxxxxxxxxx>
- References: <93d5f6290901301057sa7db05eqd00657b008726b9b@xxxxxxxxxxxxxx> <20090130203609.GB88973@xxxxxxxxxxxxx> <20090130205448.GC88973@xxxxxxxxxxxxx>
теперь при запросе несуществующего url с любым языком выдается
содержимое /500.html, причем если этот файл удалить, то выскакивает
сообщение
Status: 500 Internal Server Error Content-Type: text/html
Application error (Rails)
в пределах server-а никаких ссылок на 500.html нет
location /ru/ {
error_page 500 502 503 504 /500_ru.html;
error_page 404 = @mongrel_ru;
}
location @mongrel_ru {
proxy_pass http://mongrel;
proxy_intercept_errors on;
recursive_error_pages on;
error_page 404 /404_ru.html;
}
вот секция location / :
location / {
if (-f $request_filename) {
break;
}
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
if (!-f $request_filename) {
proxy_pass http://mongrel;
access_log /home/abp/log/nginx.offside-mongrel.access.log
main buffer=100;
break;
}
}
--
regards,
Maxim
|