Hello,
I'm having a problem matching virtual hosts.

I am using this reference:
http://httpd.apache.org/docs/2.2/vhosts/examples.html

(Specifically the part: "Name-based hosts on more than one IP address.")

An example (snippet) of my config (ubuntu 12.04) is:
-------------------------------------------------
# main landing for maindomain.com (IP: 000.000.000.27)
ServerName maindomain.com
DocumentRoot /var/www/maindomain.com/edc
DirectoryIndex Welcome.tpl


# The rest of the sites
NameVirtualHost 000.000.000.28:80

# firstvhost.com
<VirtualHost 000.000.000.28:80>
        DocumentRoot /var/www/maindomain.com/restsites
        ServerName firstvhost.com
        ServerAlias www.firstvhost.com
        DirectoryIndex Welcome.tpl

        <Directory /var/www/maindomain.com/restsites/>
        ...

---- etc.. SNIP -----

# secondvhost.com
<VirtualHost 000.000.000.28:80>
        DocumentRoot /var/www/maindomain.com/restsites
        ServerName secondvhost.com
        ServerAlias www.secondvhost.com
        DirectoryIndex Welcome.tpl

        <Directory /var/www/maindomain.com/restsites/>
        ...

--------------------------------------------------

The result I am seeing is that no matter what domain I put in that is routed to my server, the landing is always:

/var/www/maindomain.com/edc/Welcome.tpl

When, for example, I am expecting
/var/www/maindomain.com/restsites/Welcome.tpl

to be root if I type "www.firstvhost.com" or "www.secondvhost.com" in the browser. Can someone point me where I'm going wrong?

Note, both www.firstvhost.com www.secondvhost.com traceroute to the .28 IP address.

Thanks!

Donovan




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to