1. 新建404页面:404.html,并在<head>标签中加入代码:
<script type="text/javascript" charset="utf-8"> function gotoInd(){window.location.href="/"}setTimeout("gotoInd()",1);</script>
2. 在网站根目录下新建close.html:
<!DOCTYPE html> <html> <meta charset="UTF-8"> <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"> <body> <div style="height: 28px;display: flex;flex-direction: row;align-items: center;justify-content: center;border-radius: 2px;margin-top:300px;">网页更新维护中......</div> </body> </html>
3.配置Nginx服务器:
server
{
    listen 80;
    server_name abc.com 127.0.0.1;
    #index index.php index.html index.htm default.php default.htm default.html;
    index 404.html;    //修改此处
    root /www/wwwroot/haizhu.com.cn;
    
    #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
    #error_page 404/404.html;
    #SSL-END
    
    #ERROR-PAGE-START  错误页配置,可以注释、删除或修改
    error_page 404 /404.html;     //修改此处
    #error_page 502 /502.html;
    #ERROR-PAGE-END