Apache服务器上设置404错误页面

Apache服务器上设置404错误页面

基于ubuntu 16.04系统,使用 apache 进行设置

配置步骤

  • 添加404页面
在所配置网站的根目录添加编辑好的 404.html 
  • 修改localized-error-pages.conf配置文件
localized-error-pages.conf位于 /etc/apache2/conf-enabled目录下

把#ErrorDocument 404 /404.html 去掉# 
  • 重启 apache 服务器
/etc/init.d/apache2 restart #重启

更多精彩文章访问:小时娱乐网(http://www.xsyl0.com

posted @ 2020-01-30 23:21  hiiu  阅读(686)  评论(0编辑  收藏  举报