Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

virtualhost problem

Status
Not open for further replies.

johndavis

MIS
Jan 27, 2001
3
US
Hello.

I have two websites I want to host. DNS for both of the sites point to my static IP address. When I set them both up as name based virtual hosts (according to the instructions in "Apache Server Unleashed") both of the URLs point at the first virtual host. I have followed the directions explicitly, but I still can't get the urls to point to their individual directories. I have used the NameVirtualHost directive exactly as prescribed, and it still does not work. Any ideas on what I did wrong? I would really appreciate any pointers you guys may have.
 
Your NameVirtualHost directive should be set your static ip address. Then for your <VirtualHost> segments, you should have something like the following:

<VirtualHost ip.address.here>
ServerName domain.name
DocumentRoot /different/directories/here
</VirtualHost>

Here's the name-based virtualhost document from the Apache site:
That's about it. Good luck.

brendanc@icehouse.net
 
That's exactly what I did, but it still failed. This works so well in Redhat 6.1. I just can't understand why it won't work here. If anyone thinks it will help, I will post the entire config file..

John Davis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top