nginx配置404.html,50x.html

阅读更多

 

配置片段

        error_page  404              /404.html;
        location = /404.html {
            root   html;
        }

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

把404.html,50x.html放到html下,

页面内引用的静态资源,建议采用/开头(静态资源也放到html下)

 

404页面内容太少,IE下无效的解决办法

web.xml配置404,500自定义错误页面无效的解决办法
http://happyqing.iteye.com/blog/2196958

 

 

 

你可能感兴趣的:(nginx,404,500)