how to setup custom error page

Delta Yeh delta.yeh at gmail.com
Wed Aug 13 10:13:50 MSD 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080813/a208a1d8/attachment.html>


More information about the nginx mailing list