[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nginx
Subject:    Re: nginx not picking up error_page
From:       Guy Naor <guy () mor ! ph>
Date:       2009-03-30 0:34:05
Message-ID: 49D0137D.9010908 () mor ! ph
[Download RAW message or body]

Hi Maxim,

Perfect! Thanks a lot.

Bye,

Guy.


Maxim Dounin wrote:
> Hello!
>
> On Sun, Mar 29, 2009 at 11:28:35AM -0700, Guy Naor wrote:
>
>   
>> Hi,
>>
>> I have an nginx setup to serve rails applications. But for some reason  
>> it's not picking up the error_page 400 404 /40x.html.
>>
>> Here is part of the config file:
>>
>> This is inside my location / {} config part
>>
>> error_page   500 502 503 504 /50x.html;
>> error_page   404 400 403 /40x.html;
>>
>> Here is the access log entry. Nginx is getting a 500 but just returning  
>> it as is (it's the exception description in rails). But I want it to go  
>> to the nicer 50x.html
>>     
>
> By default nginx only uses error_page's for errors it generates 
> itself.  If you want it to intercept errors returned by backends - 
> use proxy_intercept_errors/fastcgi_intercept_errors as 
> appropriate.
>
> Maxim Dounin
>
>   
>> 72.211.211.12 guy.test.com - [29/Mar/2009:18:17:46 +0000] GET /testpage  
>> HTTP/1.1 "500" 21799 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;  
>> rv:1.9.0.7) Gecko/2009030503 Fedora/3.0.7-1.fc10 Firefox/3.0.7" "-"
>>
>> The error log shown no error, btw.
>>
>> Bye,
>>
>> Guy.
>>
>>
>>     
>
>
>   


[Attachment #3 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Maxim,<br>
<br>
Perfect! Thanks a lot.<br>
<br>
Bye,<br>
<br>
Guy.<br>
<br>
<br>
Maxim Dounin wrote:
<blockquote cite="mid:20090330000318.GA25573@mdounin.ru" type="cite">
  <pre wrap="">Hello!

On Sun, Mar 29, 2009 at 11:28:35AM -0700, Guy Naor wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,

I have an nginx setup to serve rails applications. But for some reason  
it's not picking up the error_page 400 404 /40x.html.

Here is part of the config file:

This is inside my location / {} config part

error_page   500 502 503 504 /50x.html;
error_page   404 400 403 /40x.html;

Here is the access log entry. Nginx is getting a 500 but just returning  
it as is (it's the exception description in rails). But I want it to go  
to the nicer 50x.html
    </pre>
  </blockquote>
  <pre wrap=""><!---->
By default nginx only uses error_page's for errors it generates 
itself.  If you want it to intercept errors returned by backends - 
use proxy_intercept_errors/fastcgi_intercept_errors as 
appropriate.

Maxim Dounin

  </pre>
  <blockquote type="cite">
    <pre wrap="">72.211.211.12 guy.test.com - [29/Mar/2009:18:17:46 +0000] GET /testpage  
HTTP/1.1 "500" 21799 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US;  
rv:1.9.0.7) Gecko/2009030503 Fedora/3.0.7-1.fc10 Firefox/3.0.7" "-"

The error log shown no error, btw.

Bye,

Guy.


    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
</body>
</html>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic