Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VirtualHosting Problems

Status
Not open for further replies.

whmicro

Technical User
Aug 2, 2002
8
US
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 ServerAdmin wilsan816@yahoo.com
DocumentRoot /home/kcmultiservices/www
</VirtualHost>

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

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

<VirtualHost 192.168.2.50>
ServerName ServerAdmin wilsan816@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
(/usr/apache/conf/httpd.conf:1000)
port 80 namevhost
(/usr/apache/conf/httpd.conf:1000)
port 80 namevhost
kcmultiservice.com (/usr/apache/conf/httpd.conf:1008)
port 80 namevhost
(/usr/apache/conf/httpd.conf:1018)
port 80 namevhost
(/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 or
or even by typing the external IP from
outside I get the content of 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 &quot;Follow TCP Stream&quot; 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.
 
Get rid of the first Virtual Host. Then change each of the others to:

<VirtualHost *:80>
ServerName whatever is appropriate
ServerAdmin whatever is appropriate
DocumentRoot whatever is appropriate
</VirtualHost>
 
I agree. I think the VirtualHost_Default_:80 is messing things up for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top