Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Otheus Shelling
apache-maintenance-mode-config
Commits
8724f1c4
Commit
8724f1c4
authored
Aug 30, 2017
by
Otheus Shelling
😀
Browse files
SORRY.incl : import from nuxeo host
parent
79048b07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
SORRY.incl
SORRY.incl
+38
-0
No files found.
SORRY.incl
0 → 100644
View file @
8724f1c4
## "SORRY" SERVER
##
## Otheus - 2016-10-18
##
## If /etc/httpd/MAINTENANCE exists,
## Then for ALL Requests, return 503 and content of /var/www/html/sorry/503.html
## UNLESS request IP/host is in /etc/httpd/maintenance-bypass-hosts.txt
##
## To disable, simply remove/rename /etc/httpd/MAINTENANCE file.
## (but don't remove the bypass-hosts file, or server will fail to start)
##
## To use: include this file in each virtualhost
RewriteEngine On
## Restart server if you change this
RewriteMap hosts-bypass-maint "txt:/etc/httpd/maintenance-bypass-hosts.txt"
# IF not in maintenance, skip 3 rules
RewriteCond "/var/www/MAINTENANCE" !-f
RewriteRule ^ - [S=3]
# IF one of the excluded hosts, skip 2 rules
RewriteCond "${hosts-bypass-maint:%{REMOTE_ADDR}|%}" "!=%"
RewriteRule ^ - [S=2]
# IF not already being redirected due to 503, redirect
# with a 503 status and to appropriate page.
RewriteCond %{ENV:REDIRECT_STATUS} !=503
RewriteRule ^(.*)$ /$1 [L,R=503]
# No more rewrite rules in this path (prevents HTTPS redirection or other redirects)
RewriteRule ^ - [L]
#LogLevel rewrite:trace5
ErrorDocument 503 /sorry/503.html
<Directory /var/www/html/sorry>
Require all granted
</Directory>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment