# There are about 3 ways to do this in Apache. In order of preference:

########## Virtual host VirtualDocumentRoot

NameVirtualHost *:80

<VirtualHost *:80>
UseCanonicalName    Off
VirtualDocumentRoot /srv/www/%0
Options All
</VirtualHost>

#And then link the blog to your preferred domain, e.g.:
#ln -s /usr/share/wordpress /srv/www/blog.example.com

#Of course make sure that the domain name 'blog.example.com' resolves to your
#local machine.

#################################
########## A defined Virtual host

NameVirtualHost *:80

<VirtualHost *:80>
VirtualDocumentRoot /usr/share/wordpress/
ServerName blog.example.com
ErrorLog /var/log/apache/wp-error.log
TransferLog /var/log/apache/wp-access.log
</VirtualHost>

########## Without using Virtual host, hosted off /blog

Alias /blog /usr/share/wordpress
<Directory /usr/share/wordpress>
  Options FollowSymLinks
  AllowOverride Limit Options FileInfo
  DirectoryIndex index.php
</Directory>

########## Tips
### If permalinks or rewrite is not working you probably need:
<Directory />
   Options FollowSymLinks
   AllowOverride All
</Directory>
# In your httpd.conf

### If NameVirtualHost *:80 is not working
You probably need to replace the * with the actual IP or hostname
