maintenance页面配置

本文介绍如何使用Apache配置文件实现503错误返回,并设置维护页面及特定路径的健康检查,确保负载均衡器正常工作。

ErrorDocument 503 /maintenance.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{REQUEST_URI} !=/maintenance.html
RewriteCond %{REQUEST_URI} !=/test.php
RewriteCond %{REQUEST_URI} !=/sbivt3g/res.php
RewriteCond %{HTTP:X-Forwarded-For} !=127.0.0.1
RewriteCond %{HTTP:X-Forwarded-For} !=10.0.0.69
RewriteCond %{HTTP:X-Forwarded-For} !=10.0.0.169
RewriteCond %{HTTP:X-Forwarded-For} !=202.225.99.104
RewriteCond %{HTTP:X-Forwarded-For} !=163.139.228.163
RewriteCond %{HTTP:X-Forwarded-For} !=113.32.180.130
RewriteRule ^.*$ - [R=503,L]
</IfModule>

Alias /health-check/ "/var/www/health-check/"

 

 /health-check/test.php    --------   elbのcheck

转载于:https://www.cnblogs.com/yangxueyou/articles/8690650.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值