error_page on 0.5.35

Jamie Quint jsquintz at gmail.com
Thu Feb 21 13:15:31 MSK 2008


I'll do that, thanks.
I almost did it that way initially but was trying to avoid the duplication
:)

Best,
Jamie


On Thu, Feb 21, 2008 at 1:49 AM, Igor Sysoev <is at rambler-co.ru> wrote:

> On Thu, Feb 21, 2008 at 01:32:43AM -0800, Jamie Quint wrote:
>
> > Igor: I do not, I only have those two.
> > Roxis: I cant do this easily since I can't use a location directive
> because
> > this is at the http level rather than the server level.
>
> Roxis is right: you should set URI, but not file path.
>
> http {
>
>     error_page    404         /404.html;
>     error_page    502 503 504 /500.html;
>
>      server {
>
>         location = /404.html { root  /var/www/apps/myapp/templates; }
>         location = /500.html { root  /var/www/apps/myapp/templates; }
>
>
> > On Thu, Feb 21, 2008 at 1:19 AM, Roxis <roxis at list.ru> wrote:
> >
> > > On Thursday 21 February 2008, Jamie Quint wrote:
> > > > I have this under http in my nginx.conf file:
> > > >     error_page   404
>  /var/www/apps/myapp/templates/404.html;
> > > >     error_page   502 503 504
>  /var/www/apps/myapp/templates/500.html;
> > > >
> > > > I can access these at myapp.com/500.html and myapp.com/400.html but
> when
> > > I
> > > > get a 502 gateway error instead of displaying the 500.html page I
> get
> > > the
> > > > default nginx page. Any suggestions?
> > >
> > > you should specify URI or URL, but not full path
> > >
> > > error_page 404 /404.html;
> > > error_page 502 503 504 /500.html;
>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080221/8d4a2e70/attachment.html>


More information about the nginx mailing list