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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual Host takes over server

Status
Not open for further replies.

frozenpeas

Technical User
Sep 13, 2001
893
CA
hi. I am running Red Hat 7 and Apache 1.3. I want to set it up with two domain names (one to the primary, and one vhost). As soon as I create a virtual host, ALL incoming requests go to it and the primary is ignored.

If I define two virtual hosts, then everything is ignored and I get 404s.

Please help!
 
Hi,
I'm new to apache but from what I read so far the main server is ignored if you've created a namebased virtual server under the same ip and port. Say you've got a main server with the ip 123.45.67.8 and port 80 and the virtual host listens at the same port and ip then all requests are proccessed from the virtual server. What you can do is to give the virtual server a different ip or port or create a new virtual host that replaces your main server. So that you've got two virtual servers.

Marcus
 
Thanks, Marcus. I did some more research and found the same thing. What I have done now is set everything up as virtual hosts.

On another note, now when the server is access via the IP address, it goes to the first virtual host that was defined.

Thanks for your response.
 
You are behind a firewall, correct?
Check out my FAQ in this forum for more information on resolving this problem.
Rninja

smlogo.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top