<VirtualHost *>
DocumentRoot /web/example.com/www
ServerName www.example.com
ServerAlias example.com
CustomLog /web/example.com/logs/access.log combined
ErrorLog /web/example.com/logs/error.log
</VirtualHost>
Include /etc/apache/virtual-hosts/*.conf
ServerSignature Off
ServerTokens Prod
ErrorDocument 404 /404.html
Alias /common /web/common
Redirect permanent /old http://example.com/new
ScriptAlias /cgi-bin/ /web/cgi-bin/
Process .cgi scripts
AddHandler cgi-script .cgi
DirectoryIndex index.cfm index.cfm
Options -Indexes
<Location /images>
Options +Indexes
</Location>
htpasswd -c /etc/apacheusers
AuthName "Authentication Required"
AuthType Basic
AuthUserFile /etc/apacheusers
Require valid-user
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Order Deny,Allow
Deny from all
Allow from 176.16.0.0/16
RewriteEngine On
RewriteRule ^/news/([0-9]+)$ /news.cfm?id=$1 [PT,L]
Redirect www.example.com to example.com
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com$1 [R=301,L]