Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

main server -vs- virtual host

all 4 dns names bring me to main server



4:36 am on Jan 17, 2004 (gmt 0)

10+ Year Member

I have 4 dns names pointed at my IP. All 4 take me to www.example.com . I have all 4 in containers in the virtual host configuration. What am I doing wrong?

<VirtualHost *>
ServerAdmin example@example.com
DocumentRoot Library/Apache2/htdocs/sites/example/public_html
ServerName example.com

<VirtualHost *>
ServerAdmin example1@example1.com
DocumentRoot Library/usr/home/example1.com/public_html
ServerName example1.com

<VirtualHost *>
ServerAdmin example2@example2.com
DocumentRoot Library/usr/home/example2.com/public_html
ServerName example2.com

<VirtualHost *>
ServerAdmin example3@example3.com
DocumentRoot Library/usr/home/example3.com/public_html
ServerName example3.com


4:57 am on Jan 17, 2004 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member


Welcome to WebmasterWorld [webmasterworld.com]!

I hope one of our server-level configuration gurus will stop in and help you out. Things get a bit quiet here over the weekends, so it may be monday before we can get an authoritative answer for this and your other post.

We'll just hope it's not that long, but I wanted to roll out the welcome mat and say hello!



5:24 am on Jan 17, 2004 (gmt 0)

10+ Year Member

Welcome to Webmaster World, appleman58.

I'll take a stab at this one...

Have you tried it this way, with your IP & the port?


This might help: Apache 2.0 Virtual Hosts [httpd.apache.org]



5:43 am on Jan 17, 2004 (gmt 0)

10+ Year Member

Thanks for responding Jim, Found something strange...when I access them through Safari they all work fine...but when I access them through Explorer or Netscape all 4 addreses take me to the main server....
What is going on?



5:55 am on Jan 17, 2004 (gmt 0)

10+ Year Member

Ok bunlt tried your suggestion...same results in explorer and netscape,,,,Safari works fine ,,,,?
Thank You for trying :)


3:54 am on Jan 18, 2004 (gmt 0)

10+ Year Member

Have you looked at the log file (access_log) to see if there is anything different in the way each browser is asking for the page? Is it identical apart from the agent string (and time), or is there some other difference?

One remote possibility is that the failing browsers have been set to use HTTP 1.0 rather than 1.1 and so do not send the host name (so no way to choose the right one), but I can't reproduce that type of problem with MSIE on Windows.

The actual config looks fine, I use basically the same (with Apache 1.3), works fine. I assume you have a "NameVirtualHost *" line somewhere earlier in the config.


10:15 pm on Jan 18, 2004 (gmt 0)

10+ Year Member

To all that were so kind to respond:

Very simple solution. I failed to name ServerAlias. Now everything works fine. Next battle is getting CGI to work. Sometimes think im getting to old for this.

Thanks again all!



Featured Threads

Hot Threads This Week

Hot Threads This Month