I would like to run multiple websites, and I would like each website (differentiated by a subdomain) to point to a different DocumentRoot.
My Setup
Host Machine: Mac (Lion)
Development Machine Ubuntu 10.04 (a vm using VirtualBox)
From the Mac’s browser, I want to be able to access
http://website1.dev
http://website2.dev
Appreciate any help that can be given.
Note: When I try to use a ServerName I get
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Have you seen or read the VirtualHost examples provided in the latest online Apache documentation? This specific section (the first one on the list) on “running several name-based web sites on a single IP address” should help you, it seems to be exactly what you are attempting to do. Here’s the snippet, modified for your needs:
You will have to elaborate more if this does not work. What’s your Apache version? What are you current httpd.conf and virtualhost.conf file contents?