NameVirtualHost * ServerName dir.xiph.org SetEnv ENVIRONMENT prod KeepAlive Off DocumentRoot /var/www/dir.xiph.org Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # 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] 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 %{REMOTE_ADDR} ^91\.183\.83\.54$ # RewriteCond %{REQUEST_URI} !^/loadshedding.html$ # RewriteCond %{REQUEST_URI} !^/abuse.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 YPMessage "BANNED FOR ABUSE! Don't hit a production system with bogus development traffic! Contact thomas@ruecker.fi for details." env=REDIRECT_LOADSHEDDING # Header set TouchFreq "14400" env=REDIRECT_LOADSHEDDING # Header set SID "-1" env=REDIRECT_LOADSHEDDING # ErrorDocument 503 /loadshedding.html # ErrorDocument 503 /abuse.html # Logging ErrorLog /var/log/apache2/dir-error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel debug # CustomLog /var/log/apache2/dir-access.log combined ServerSignature Off # Hide .svn dirs Order deny,allow Deny from all # The same goes for docs Order deny,allow Deny from all # The same goes for inc Order deny,allow Deny from all # Expire header ExpiresActive On ExpiresByType text/css "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/html "access plus 30 minutes" ExpiresByType application/xml "access plus 5 hours" # ETags FileETag None # Compression AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/xml text/xml application/x-javascript # SecRuleEngine On # SecAuditEngine on # SecAuditLog /var/log/apache2/website-audit.log # SecRequestBodyAccess on # SecAuditLogParts ABIFHZ # SecDefaultAction nolog,noauditlog,allow,phase:2 # SecRule REQUEST_METHOD "^POST$" "chain,allow,phase:2" # SecRule REQUEST_URI ".*" "auditlog"