首页 > 其他 > 详细

nginx配置403错误页面

时间:2014-05-08 16:41:54      阅读:819      评论:0      收藏:0      [点我收藏+]

建立403 error 页面, 403.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><title>Error 403</title></head>
<body>
<b><font size=5>Sorry!</font></b>
<p> <b>403 reject access</b> . 
<p><b>Please contact administrator zrer90.</b> 
<p><b>Think you.</b>
</body>
</html>

                        #不加<!DOCTYPE> 描述的话, IE浏览器只显示nginx默认403页面

修改nginx.conf

    server {
        listen       80;
        server_name  localhost;
        error_page 403 /403.html;
        access_log  logs/test.access.log  main;
        root /home/test/;
        index   index.html;
        }      

测试访问:

bubuko.com,布布扣

nginx配置403错误页面,布布扣,bubuko.com

nginx配置403错误页面

原文:http://zrer90.blog.51cto.com/8679896/1408290

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!