http和nginx错误定义

ErrorDocument 404 http://www.baidu.com                  错误转到路径

<Directory />
AllowOverride all
Require all denied
</Directory>


error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;              错误转到路径
}

 

原文地址:https://www.cnblogs.com/itzhao/p/11249971.html