I wonder if someone can help a relative newbie to webhosting set up a machine. I did a search on 'virtual hosts' in this forum, and from that I think that I'm on the right track but am actually more confused, because it just seems that the way I have it set up *should* be working.
I am trying to host multiple personal webpages & Movable Type blogs for people in my company from a machine running OS X 10.3.2. I'm currently trying to simulate this using Virtual Hosts on localhost.
Here's my problem: I want every user to have a clean, single word URL which goes to their directory (right now I have individual test directories in /Library/WebServer/Documents/) Here is a typical Virtual Host entry in httpd.conf
Code:
<VirtualHost *>
DocumentRoot /Library/WebServer/Documents/other/
ServerName www.other.site
</VirtualHost>
I have used Netinfo Manager to set up alternative domains with an ip address of 127.0.0.1
My assumption is that when this machine should go live, I would change all the "machines" ip addresses to the actual internet IP of the computer, and update the DNS entries for the URLs, and wait for the hits to roll in.
However, I find that in my test environment, entering "http://www.other.site/" into my browser returns the raw index of /Library/WebServer/Documents/, and only the URL "http://www.other.site/other/" returns the site index, in this case the index of the Movable Type blog.
So, my questions are:
a) how do I fix my directory structure or Virtual Host entry so that the simple URL returns the site index page in the directory in the Documents directory, or
b) if for some reason this is not possible, how do I forward "http://www.other.site/" to "http://www.other.site/other/" without showing the directory information in /Library/Webserver/Documents?
Oh, and just to be greedy, one more thing: right now the URL "http://www.first.site/other/" will return the index page meant to be associated with "http://www.other.site"... how can I prevent this kind of 'site bleeding'?
Thanks in advance for any help!