ServerName api.dir.xiph.org
SetEnv ENVIRONMENT prod
KeepAlive Off
DocumentRoot /var/www/api.dir.xiph.org
Options FollowSymLinks
AllowOverride None
Options +ExecCGI -Indexes -FollowSymLinks -MultiViews
AllowOverride None
Order allow,deny
allow from all
AddHandler cgi-script .cgi
# Rewrite rules
RewriteEngine On
# RewriteRule ^/experimental/.*$ %1.cgi
# and if it does not exist as a directory
RewriteCond %{REQUEST_FILENAME} !-d
# and if it does not exist as a file
RewriteCond %{REQUEST_FILENAME} !-f
# then add .cgi to get the actual filename
RewriteRule ^(.*)$ $1.cgi [L]
RewriteRule ^/administrator.*$ http://127.0.0.1/ [R]
# Logging
ErrorLog /var/log/apache2/api-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
# LogLevel debug
CustomLog /var/log/apache2/api-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 application/json