Ruby Forum NGINX > how to setup custom error page

Posted by Delta Yeh (Guest)
on 13.08.2008 08:20
(Received via mailing list)
I want to use nginx to proxy 2 web server and I want to use custom error
page on nginx box.
The following config doesn't work.

error_page 404 /web_errors/404.html;
error_page 503 /web_errors/503.html;
error_page 502 /web_errors/502.html;

server {
        listen       80;
        server_name  www.mydomain.com;

 location ^~ /web_errors/ {
            internal;
            root /foo/errordoc/html;

        }
        location / {
           proxy_redirect  off;
           proxy_redirect  default;
           proxy_pass http://10.10.1.2;
        }

}

Please help me to find out my mistake.

Thanks


Yours,
DeltaY
Posted by Delta Yeh (Guest)
on 13.08.2008 08:22
(Received via mailing list)
sorry, there is  "proxy_intercept_errors on;" in my original config 
already.
 I forgot to paste it.
^_^
2008/8/13 Delta Yeh <delta.yeh@gmail.com>
Posted by Delta Yeh (Guest)
on 13.08.2008 08:36
(Received via mailing list)
ooo, I make a stupid mistake.

when I move the error pages from  /foo/errordoc/html  to
/foo/errordoc/html/web_errors

It works!

shame on me for such a mistake.


2008/8/13 Delta Yeh <delta.yeh@gmail.com>