All pastes #559935 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-11 23:21 UTC
rendered paste body
NameVirtualHost *:80

<VirtualHost *:80>

  ServerName harleypig.com
  ServerAlias *.harleypig.com

  DocumentRoot "/home/www/com/harleypig"

  RewriteEngine   On

  RewriteLog      "/var/log/apache2/rewrite.log"
  RewriteLogLevel 3

  RewriteCond   %{HTTP_HOST}         ^harleypig\.com [NC]
  RewriteRule   ^/(.*)$              /home/www/com/harleypig/_/$1 [L]

  RewriteCond   %{HTTP_HOST}         ^(.*)\.harleypig\.com [NC]
  RewriteCond   %{DOCUMENT_ROOT}/%1  !-d
  RewriteRule   ^/(.*)$              /home/www/com/harleypig/www/$1 [L]

  RewriteCond   %{HTTP_HOST}         ^(.*)\.harleypig\.com [NC]
  RewriteRule   ^/(.*)$              /home/www/com/harleypig/%1/$1 [L]

  RewriteCond   %{REQUEST_URI}       !^images.harleypig.com
  RewriteCond   %{REQUEST_FILENAME}  favicon.ico$
  RewriteCond   %{REQUEST_FILENAME}  !-f
  RewriteRule   %{HTTP_HOST}         images.harleypig.com

  <Directory "/home/www/com/harleypig">
    Options Indexes FollowSymLinks ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>

</VirtualHost>