My Ubuntu server has this in /etc/apache2/sites-enabled/002-foosite
<VirtualHost 72.14.xxx.yyy:80> ServerName foosite.com ServerAlias www.foosite.com DocumentRoot /home/bar/public_html ServerAdmin email@example.com </VirtualHost>
Everytime I go to my server's port 80, I get the contents of /home/bar/public_html. But what I want to do is have more than one DocumentRoot based on the URL the user accesses. For example:
http://server/bar should go have DocumentRoot /home/bar/public_html http://server/pligg should have DocumentRoot /srv/www/pligg http://server/~blah should have DocumentRoot /home/blah/public_html
I'm sure this is not an uncommon setup, but I don't really understand the differences between Alias, VirtualHost, NameVirtualHost and all the other settings to configure this. How can I do this?