Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > virtual hosts

virtual hosts
Thread Tools
Mac Enthusiast
Join Date: May 2001
Location: New York, NY, USA
Status: Offline
Reply With Quote
Feb 8, 2004, 01:38 PM
 
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!
     
Senior User
Join Date: Oct 2000
Location: Midwest
Status: Offline
Reply With Quote
Feb 8, 2004, 02:18 PM
 
Great nick!!

Have you set the NameVirtualHost directive?

Have used this reference at Apache for setting up Virtual Hosts?

Craig
     
Mac Enthusiast
Join Date: May 2001
Location: New York, NY, USA
Status: Offline
Reply With Quote
Feb 8, 2004, 02:35 PM
 
Awesome, thank you so much! I didn't know about the NameVirtualHost directive, so it was commented out. Uncommenting it did the trick!

I knew it was something simple like that...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:05 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2