51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

nginx 系统维护 界面配置

需要配置一个 重定向

cat closesite.conf

server{

  listen 443 ssl;
  server_name abc.cn;

     location  / {
        root   /usr/share/nginx/html/notify;
        index  index.html index.htm;
    }

     location = /Login {
        return https://abc.cn;

     }

	ssl_certificate   /etc/nginx/ssl_key/abc.cn/abc.cnn.pem;
        ssl_certificate_key  /etc/nginx/ssl_key/abc.cn/abc.cn.key; 

       error_page  404 403 500 502 503 504  /404.html;
       location = /404.html {
        root   /usr/share/nginx/html/notify;
      }


}




server {
   listen 80;
   server_name  abc.cn;


    if ($host != 'abc.cn' ) {
        return 403;
    } # managed by Certbot
   rewrite ^/(.*)$ https://abc.cn:443/$1 permanent;
}

/usr/share/nginx/html/notify

404 页面内容:

html 源码 (系统维护中) : 连接

linux 具体到某一天执行任务 案例 : 连接

赞(0)
未经允许不得转载:工具盒子 » nginx 系统维护 界面配置