You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by jose sanchez <j_...@yahoo.com> on 2003/04/16 18:01:02 UTC

[users@httpd] Virtual Hosting Problems

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@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 www.bluekc.com
        ServerAdmin wilsan816@yahoo.com
        DocumentRoot /home/bluekc/www
</VirtualHost>

<VirtualHost 192.168.2.50>
        ServerName www.albertopujols.com
        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
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

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual Hosting Problems

Posted by Lee Fellows <lf...@4lane.com>.
On Wed, 2003-04-16 at 13:34, jose sanchez wrote:

> <VirtualHost 192.168.2.50:80>
>         ServerName www.bluekc.com
>         ServerAlias bluekc.com
>         ServerAdmin wilsan816@yahoo.com
> </VirtualHost>
> 

  If you telnet to this machine like this:
  telnet 192.168.2.50 80 and type

  'GET / HTTP/1.1<cr>
  HOST: www.bluekc.com<cr><cr>'

  What do you get?




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual Hosting Problems

Posted by jose sanchez <j_...@yahoo.com>.
Juan:

I've tried all the options (I think). I'm running a
server very similar to yours: Woody 3.0, Apache
1.3.27. The only think I am not hosting is my own DNS
server. I registered the domains at
www.registerfly.com, they offer free domain masking. I
have them masking the domains to my external IP. I've
done this on the past and worked. The only difference
is that this time I am running the server behind a
firewall/router I created with IPTABLES. I don't know
what else to try, the default page is always loading.

This is another change I made:
<VirtualHost 192.168.2.50:80>
        DocumentRoot /home/httpd/html/
</VirtualHost>

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

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

<VirtualHost 192.168.2.50:80>
        ServerName www.bluekc.com
        ServerAlias bluekc.com
        ServerAdmin wilsan816@yahoo.com
</VirtualHost>

<VirtualHost 192.168.2.50:80>
        ServerName www.albertopujols.com
        ServerAdmin wilsan816@yahoo.com
        ServerAlias albertopujols.com 
        DocumentRoot /home/albertopujols/www/
</VirtualHost>

This is httpd -S output: (As usual, looks correct)

VirtualHost configuration:
192.168.2.50:80        is a NameVirtualHost
                       default server 192.168.2.50
(/usr/apache/conf/httpd.conf:995)
                       port 80 namevhost 192.168.2.50
(/usr/apache/conf/httpd.conf:995)
                       port 80 namevhost
www.kcmultiservice.com
(/usr/apache/conf/httpd.conf:1000)
                       port 80 namevhost
www.kcmultiservices.com
(/usr/apache/conf/httpd.conf:1009)
                       port 80 namevhost
www.bluekc.com (/usr/apache/conf/httpd.conf:1021)
                       port 80 namevhost
www.albertopujols.com
(/usr/apache/conf/httpd.conf:1030)


I don't know what else to try. :(

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

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual Hosting Problems

Posted by juanca <ju...@sat.com.py>.
I´ve got defined 14 domains, I´m runnig apache 1.3.26 with Bind and this is
my  apache configuration file
Everything runnig on a Debian Woody 3.0 I believe this should work, to
accomplish this look at example below try with this configuration, and Let
us know what happens
Listen 80
NameVirtualHost 192.168.2.50:80

# Agregado automáticamente por addvdomain
<VirtualHost www.domain1:80>
    ServerAdmin webmaster@domain1
.py
    DocumentRoot /var/www/domain1
    User domain1
    Group domain1
    ServerName www.domain1
.py
    ErrorLog /var/log/apache/domain1
-error.log
    CustomLog /var/log/apache/domain1
-access.log common
</VirtualHost>
 Regards  from Asuncion Paraguay


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual Hosting Problems

Posted by jose sanchez <j_...@yahoo.com>.
I've tried this and it doesn't work.
Thanks for your reply though.

--- juanca <ju...@sat.com.py> wrote:
> You get that because you�ve defined your Name
> VirtualHost as 192.168.2.50
> now What you have to do is to add this 
> NameVirtualHost 192.168.2.50:80
> instead  NameVirtualHost 192.168.2.50
> and to your vhosts as well
> I mean something like this
> 
> <VirtualHost 192.168.2.50:80>
>     ServerAdmin webmaster@yourdomain
>     DocumentRoot /var/www/yourdomain
> Now try again with changes, everything should go
> well.
> 
> Regards from Asuncion Paraguay


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

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual Hosting Problems

Posted by juanca <ju...@sat.com.py>.
You get that because you´ve defined your Name VirtualHost as 192.168.2.50
now What you have to do is to add this  NameVirtualHost 192.168.2.50:80
instead  NameVirtualHost 192.168.2.50
and to your vhosts as well
I mean something like this

<VirtualHost 192.168.2.50:80>
    ServerAdmin webmaster@yourdomain
    DocumentRoot /var/www/yourdomain
Now try again with changes, everything should go well.

Regards from Asuncion Paraguay


----- Original Message -----
From: "jose sanchez" <j_...@yahoo.com>
To: <us...@httpd.apache.org>
Sent: Wednesday, April 16, 2003 9:01 AM
Subject: [users@httpd] Virtual Hosting Problems


> 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@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 www.bluekc.com
>         ServerAdmin wilsan816@yahoo.com
>         DocumentRoot /home/bluekc/www
> </VirtualHost>
>
> <VirtualHost 192.168.2.50>
>         ServerName www.albertopujols.com
>         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
> 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
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org