VirtualHost Configuration – First Trial
by walter on May.27, 2009, under Blogging, Linux
Visited 402 times, 1 so far today
With permalinks now working, I’d like to figure out how to use Apache’s virtualhosts to make different URLs go to different folders as their root. www.URL.com, blog.URL.com, and www.URL2.com would go to different folders as their document roots. My first attempt only partially worked.
As my first attempt, I added the following code to httpd.conf.
<VirtualHost *:80>
ServerName blog.neutralaxis.com
DocumentRoot /var/www/wordpress
</VirtualHost>
That partially worked, but with two failings. First, it redirected even servernames other than the one indicated to documentroot. Second, while it loaded this blog homepage correctly, links resulted in internal server errors showing “Request exceeded the limit of 10 internal redirects due to probable configuration error.” That sounds like maybe it means there’s a loop happening, but I don’t know why yet.