[Wlug] Virtual Hosting

jose sanchez j_r_sanchez@yahoo.com
Mon, 3 Feb 2003 18:32:44 -0800 (PST)

Hello All:

I am experiencing a weird problem with Name based
virtual hosting with apache. I don't know if I am
doing this correctly. The webserver is behind a
firewall that is NATing traffic to it.

I have three domain names, example: domain1.com,
domain2.com, and domain3.com. I have the registrar of
the domains forwarded to my external ip (24.31.xx.xx).
The webserver's ip is This is what the
http.conf file looks like:


        ServerName www.domain1.com
        ServerAdmin wilsan816@yahoo.com
        DocumentRoot /home/domain1/www

        ServerName www.domain2.com
        ServerAdmin wilsan816@yahoo.com
        DocumentRoot /home/domain2/www

        ServerName www.domain3.com
        ServerAdmin wilsan816@yahoo.com
        DocumentRoot /home/domain3/www

Somehow the virtual hosting is not working. When I
type www.domain2.com or www.domain3.com on the browser
I get the content or pages of domain1.com. I don't
know why is doing that. When I type www.domain1.com,
obviously works.

Now, the address bar changes from www.domainx.com to
24.31.xx.xx/index.php. The registrar where the domains
are registered doesn't offer free "Domain Masking"
(when the domain name stays on the browser' address
bar). I don't know if this is why I am having this
problem. If anyone have experienced this before please
let me know.

Thanks in advance.

"An ounce of gold cannot buy an ounce of time."
- Anonymous


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.