Created
July 26, 2017 16:10
-
-
Save iitenkida7/58f7b28aab1d4b59a81671017e869c9a to your computer and use it in GitHub Desktop.
Apache_Maintenance_mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#メンテナンス切り替えサンプル | |
ErrorDocument 503 /mainte/index.html | |
RewriteEngine on | |
RewriteCond /home/hoge/contents/mainte_mode -f | |
RewriteCond %{X-Forwarded-For} !^127\.0\.0\.1$ | |
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$ | |
RewriteCond %{REQUEST_URI} !^/mainte/.* | |
RewriteCond %{REQUEST_URI} !^/srv-status | |
RewriteRule ^.*$ - [R=503,L] | |
Alias /mainte /home/hoge/contents/mainte | |
<Directory "/home/hoge/contents/mainte"> | |
Options FollowSymLinks | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment