配置 Nginx 错误页面优雅显示

[root@localhost ~]# cat /usr/local/nginx/conf/nginx.conf
......
http {
    location / {
        root   html/www;
        index  index.html index.htm;            
        error_page 400 401 402 403 404 405 408 410 412 413 414 415 500 501 502 503 506 = http://www.xxxx.com/error.html;
        # 将这些状态码的页面链接到 http://www.xxxx.com/error.html ,也可以单独指定某个状态码的页面,如 error_page 404 /404.html
    }
}