I followed this guide: How To Setup an Ubuntu LAMP Server for Development Purposes Only
But I've run into a problem. The Server I setup is on a VM (VirtualBox). I did this so I wouldn't have to manage it on my local machine and I could easily turn it on/off when needed. I used 64bit Ubuntu 9.04 Server. I gave the VM it's own Static IP address (192.168.1.105) and HostName (LAMPVM) via my Routers config.
The problem I've run into is when I try and access my virtual hosts from my HARDmachine (not the VM), it doesn't work...
I have my /etc/apache2/httpd.conf setup as follows:
Allow from all
I have the following sites-enabled:
ServerAlias localhost *.localhost
ServerAlias test1 *.test1
ServerAlias test2 *.test2
And I enter "LAMPVM" into my browser it only goes to the most recent domain I added (test2).
If I enter "test1.LAMPVM" into my browser it doesn't find the address.
I realize this is because my DNS on my HARDmachine (not the VM) is not configured to recognize what "test1.LAMPVM" means. But when I enter the following into my /etc/hosts file of my HARDmachine:
By browser goes to the address "test2.lampvm", but it thinks "test1.lampvm" is the same as "test2.lampvm" (or "test1.lampvm" is being routed to the most recently added domain [which happens to be test2]).
Again, I kinda get why this isn't working because both "test1.lampvm" and "test2.lampvm" are pointing to the same address (192.168.1.105), but that is the address of the VM, and I don't know how else to get access to multiple domains on the same VM/IP?
My guess is I probably need to make some adjustments in my Router, but not sure exactly what?
Also in a possibly related note I get some warnings when reloading Apache:
sudo /etc/init.d/apache2 reload
* Reloading web server config apache2 [Tue Oct 06 11:20:22 2009] [warn] The Alias directive in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.
[Tue Oct 06 11:20:22 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[ OK ]
I noticed that someone else was also getting these warnings but there was no reply there?
Any/All Help, Comments, Suggestions will be greatly appreciated.