基于ubuntu 16.04系统,使用 apache 进行设置
在所配置网站的根目录添加编辑好的 404.html
localized-error-pages.conf位于 /etc/apache2/conf-enabled目录下 把#ErrorDocument 404 /404.html 去掉#
/etc/init.d/apache2 restart #重启
Apache服务器上设置404错误页面
原文:https://www.cnblogs.com/hiiu/p/12244338.html