nginx 系统维护 界面配置 : 连接
nginx配置:
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
cat closesite.conf
源码:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>系统更新维护中</title>
</head>
<style>
*{
margin:0;
padding:0;
}
html{
height:50%;
}
body{
background:#F1FDFE;
height:100%;
}
.mom{
width:600px;
height:300px;
line-height:100px;
text-align:center;
font-size:30px;
border-width:5px;
border-style:dashed;
border-color:#FFFFFF;
background:#e6fafd;
color:rgb(255, 0, 55);
}
</style>
<body>
<div>
<div class="web_notice" style="position: fixed;top: 0;left: 0;width: 200%;height: 100%;background: rgba(0,0,0,0.3);z-index: 99999;">
<div style="position: fixed;top: 50%;left: 50%;width: 600px;background: #FFF;transform: translate(-50%, -50%);border-radius: 40px;padding: 100px 25px;" class="mom">
<h1 style="font-weight: bold;top: 50%;text-align: center;font-size: 45px;margin-top: -40px;">系统更新维护中</h1><div style="font-size:33px;margin-top:30px;line-height:50px;color:#000000;text-align:left"> 尊敬的用户,您好!系统于11月25日00:00~24:00进行紧急维护,届时访问会受到影响,给您造成不便敬请谅解。</div>
<a style="display: block;background: #98a3ff;color: #FFF;text-align: center;font-weight: bold;font-size: 25px;line-height: 60px;margin: 0 auto;margin-top: 60px;border-radius: 32px;width: 80%;" onclick="javascript:document.querySelector('.web_notice').remove()">我知道了</ a>
</div>
</div>
</div>
</body>
</html>
欢迎来撩 : 汇总all