Virtual Hosting Problems

jose sanchez j_r_sanchez at yahoo.com
Wed Apr 16 02:45:13 CDT 2003


Hello:

Sometime ago I had a problem with getting Virtual
Hosting on Apache 1.3.27 to work properly. I don't
know what I'm doing wrong. I believe I'm configuring
the server correctly:

NameVirtualHost 192.168.2.50

<VirtualHost _default_:*>
           DocumentRoot /home/httpd/html
</VirtualHost>

<VirtualHost 192.168.2.50>
        ServerName www.kcmultiservice.com
        ServerAdmin wilsan816 at yahoo.com
        DocumentRoot /home/kcmultiservices/www
</VirtualHost>

<VirtualHost 192.168.2.50>
        ServerName kcmultiservice.com
        ServerAdmin wilsan816 at yahoo.com
        DocumentRoot /home/kcmultiservices/www
</VirtualHost>

<VirtualHost 192.168.2.50>
        ServerName www.bluekc.com
        ServerAdmin wilsan816 at yahoo.com
        DocumentRoot /home/bluekc/www
</VirtualHost>

<VirtualHost 192.168.2.50>
        ServerName www.albertopujols.com
        ServerAdmin wilsan816 at yahoo.com
        DocumentRoot /home/albertopujols/www
</VirtualHost>

Now, when I enter this command (httpd -S), this is
what I get:

VirtualHost configuration:
192.168.2.50:80        is a NameVirtualHost
                       default server
www.kcmultiservice.com
(/usr/apache/conf/httpd.conf:1000)
                       port 80 namevhost
www.kcmultiservice.com
(/usr/apache/conf/httpd.conf:1000)
                       port 80 namevhost
kcmultiservice.com (/usr/apache/conf/httpd.conf:1008)
                       port 80 namevhost
www.bluekc.com (/usr/apache/conf/httpd.conf:1018)
                       port 80 namevhost
www.albertopujols.com
(/usr/apache/conf/httpd.conf:1026)
wildcard NameVirtualHosts and _default_ servers:
_default_:*            192.168.2.50
(/usr/apache/conf/httpd.conf:993)

************
I guess this looks good.

When I try to reach www.albertopujols.com, or
www.bluekc.com, or even by typing the external IP from
outside I get the content of www.kcmultiservices.com.
This is not the default. I don't know why I can't get
to the other pages. 

This server is on a LAN that's behind a
firewall/router I built using iptables. Everything is
forwarding (nating). Now, I don't know if all the HTTP
headers are being forwarded to the server or not. I
ran ethereal on that side of the LAN and when I
selected "Follow TCP Stream" I see the address I am
requesting. 

I don't know what to do, I am getting frustrated with
this. Please help. Apologies for the long post.

Thanks in advance for your help.

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com




More information about the Kclug mailing list