sdoghds88888 发表于 2018-11-27 07:30:38

apache自定义404错误页面

  需求:自定义apache的404错误页面,使客户看到时出现的是“正在维护中,.........”等比较人性化得信息


[*]# vi /etc/httpd/conf/httpd.conf
[*]取消 ErrorDocument 404 /missing.html 前注释
[*]可以修改为:
[*]   ErrorDocument 404 /ErrPage/404.html
[*]    指放置404错误页面的路径为apache根目录中的ErrPage目录
[*]
[*]然后到/var/www/html/ErrPage中新建404.html,填入自定义内容
[*]
[*]# service httpd restart




页: [1]
查看完整版本: apache自定义404错误页面