I am having a problem configuring virtual hosts on my Apache 2.2.6 
server.  Apache ALWAYS serves up the first virtual host regardless of 
the actual host requested.

Here is the small snippet from my http.conf file (just so you know I did 
it, but please, if something is wrong...):

# Virtual hosts

Include conf/extra/httpd-vhosts.conf


Here is the contents of the httpd-vhosts.conf file:

NameVirtualHost *:80

# 
=================================================================================



    ServerAdmin ad...@prosportsresumes.com

    DocumentRoot G:/webroot/htdocs/ProSportsResumes

    ServerName www.ProSportsResumes.com



# 
=================================================================================



    ServerAdmin ci...@cisly.com

    DocumentRoot G:/webroot/htdocs/Cisly

    ServerName www.Cisly.com



# 
=================================================================================



    ServerAdmin ad...@vizbizcardz.com

    DocumentRoot G:/webroot/htdocs/VizBizCardz

    ServerName www.VizBizCardz.com



# 
=================================================================================

One post suggested I change all "*:80" to simply "*", but that didn't 
solve it.

Here is the contents of my hosts file:

127.0.0.1    localhost

127.0.0.1    www.prosportsresumes.com

127.0.0.1    www.cisly.com

127.0.0.1    www.vizbizcardz.com


At first, I thought it might have something to do with my hosts file, so 
I've also tried using the actual IP address of the web server in my LAN, 
which is a 192.168.x.x number, but that didn't solve anything, though it 
did surprise me it works the same both ways (I'm a networking idiot!)

Domains are registered at GoDaddy, and forwarded to the IP of my 
router.  This all sits behind a DLINK DIR-615 router that uses virtual 
server routing so requests on port 80 are forwarded the web server.

With all of this said, I have Apache installed on my development 
machine, and the setup identical (except for DocumentRoot), and if I add 
any host entry into my dev machine's hosts file, fire up a browser and 
hit the host, it works just fine.  For some reason, something on the way 
to my actual web server breaks horribly, and I suspect it is my 
configuration.

Feel free the visit any of the 3 sites, and it is ghastly ugly since 
things don't seem to be working just right.  It cannot seem to find any 
files such as CSS files, images, etc.    Notice only the basic HTML of 
the ProSportsResumes site is served, regardless of the actual host hit.  
If I change the order of the virtual host entries, then that site will 
be the one served for all hosts.

Any help is appreciated.

Joe Morgan





_________________________________________________________________
Send e-mail faster without improving your typing skills.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008

Reply via email to