[xiph-commits] r18860 - in branches/dir.xiph.org: . docs

dm8tbr at svn.xiph.org dm8tbr at svn.xiph.org
Sat Mar 2 12:27:38 PST 2013


Author: dm8tbr
Date: 2013-03-02 12:27:38 -0800 (Sat, 02 Mar 2013)
New Revision: 18860

Added:
   branches/dir.xiph.org/loadshedding.html
Modified:
   branches/dir.xiph.org/docs/apache-vhost.conf
Log:
dir.xiph.org apache config: Adding a prepared load shedding section in case we need to drop major load.


Modified: branches/dir.xiph.org/docs/apache-vhost.conf
===================================================================
--- branches/dir.xiph.org/docs/apache-vhost.conf	2013-03-01 20:25:28 UTC (rev 18859)
+++ branches/dir.xiph.org/docs/apache-vhost.conf	2013-03-02 20:27:38 UTC (rev 18860)
@@ -19,9 +19,24 @@
 	# Rewrite rules
 	RewriteEngine On
 	RewriteRule ^/cgi-bin/yp-cgi$ /cgi-bin/yp.php
-        RewriteCond %{QUERY_STRING} ^start=[0-9]*&num=[0-9]*&search=([^&]*)
-        RewriteRule ^/search$ /by_genre/%1 [L]
-	
+	RewriteCond %{QUERY_STRING} ^start=[0-9]*&num=[0-9]*&search=([^&]*)
+	RewriteRule ^/search$ /by_genre/%1 [L]
+	RewriteRule ^/administrator.*$ http://127.0.0.1/ [R]
+
+# Uncomment during emergencies, like system overload.
+# This will drop the system load by over 75%.
+#
+#	RewriteCond %{REMOTE_ADDR} ^31\.12\.6[48]\.20[12345678]$
+#	RewriteCond %{REQUEST_URI} !^/loadshedding.html$
+#	RewriteRule ^(.*)$ /$1 [R=503,E=LOADSHEDDING]
+#	Header set YPResponse "0" env=REDIRECT_LOADSHEDDING
+#	Header set YPMessage "Service temporarily unavailable. Emergency load shedding in progress." env=REDIRECT_LOADSHEDDING
+#	Header set TouchFreq "3600" env=REDIRECT_LOADSHEDDING
+#	Header set SID "-1" env=REDIRECT_LOADSHEDDING
+#	ErrorDocument 503 /loadshedding.html
+
+
+
 	# Logging
 	ErrorLog /var/log/apache2/dir-error.log
 	# Possible values include: debug, info, notice, warn, error, crit,
@@ -50,7 +65,7 @@
 	ExpiresActive On
 	ExpiresByType text/css "access plus 1 month"
 	ExpiresByType image/png "access plus 1 month"
-	ExpiresByType text/html "access plus 1 month"
+	ExpiresByType text/html "access plus 30 minutes"
 	ExpiresByType application/xml "access plus 5 hours"
 	
 	# ETags

Added: branches/dir.xiph.org/loadshedding.html
===================================================================
--- branches/dir.xiph.org/loadshedding.html	                        (rev 0)
+++ branches/dir.xiph.org/loadshedding.html	2013-03-02 20:27:38 UTC (rev 18860)
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html><head>
+<title>503 Service Temporarily unavailable</title>
+</head>
+<body>
+<h1>Service temporarily unavailable</h1>
+<p>Emergency load shedding in progress.</p>
+</body>



More information about the commits mailing list