You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David <li...@netelsys.com> on 2003/12/26 05:28:01 UTC

[users@httpd] IP Aliasing & Virtual Hosting issue w/ Apache 2.0.48

Greetings,

    I've successfully installed Apache 2.0.48 on my Linux Red Hat. (Kernel
2.4.23)  My intention is to host my own two domains locally.

I'm attempting to utilize IP Aliasing, to bind my single NIC to 2 IP
addresses.

    eth0 192.168.223.40:80
    eth0/0 192.168.223.41:8080

My httpd.conf reads as follows:

    Listen 192.168.223.40:80
    Listen 192.168.223.41:8080

<Virtualhost 192.168.223.40:80>
    servername        www.domain1.com
    serveralias        domain1.com, *.domain1.com
</Virtualhost>

<Virtualhost 192.168.223.41:8080>
    servername        www.domain2.com
    serveralias        domain2.com, *.domain2.com
</Virtualhost>

============================

I intended have nothing listed for the Documentroot, since is only the
configuration phase, and it defaults the Apache documentation page.

I get successfully retrievet the default Apache page for DOMAIN1.  VIA its
local address, as well as outside the LAN.  But thus far haven't had any
success "seeing" my DOMAIN2 internally or otherwise.

Does IP Aliasing require that another "network" address be used?  (ie.
192.168.223.40 & 192.168.224.40)   I suspect my issue lies within the IP
Aliasing.
I can successful ping the IP Alias address 192.168.223.41 locally. And
netstat reveals that both addresses/port are up & listening.

Your input is great appreciated.

Regards,

-David


---------------------------------------------------------------------
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] IP Aliasing & Virtual Hosting issue w/ Apache 2.0.48

Posted by David <li...@netelsys.com>.
Joshua,

 Thanks for your swift and detailed response.


As suggested I telnet'd from the server onto both domains successfully. For
this I am grateful.

However from within the LAN, I'm unable to telnet into the Linux box. This
isn't a major cause for concern, however I would appreciate if you could
enter my domain into your browser to confirm it can be accessed among the
LAN.

www.daviscustomwelding.com

I still only have the default Apache docs page in DocumentRoot.

Thanks for your valued assistance,

-David
----- Original Message ----- 
From: "Joshua Slive" <jo...@slive.ca>
To: <us...@httpd.apache.org>; "David" <li...@netelsys.com>
Sent: Thursday, December 25, 2003 11:32 PM
Subject: Re: [users@httpd] IP Aliasing & Virtual Hosting issue w/ Apache
2.0.48


>
> On Thu, 25 Dec 2003, David wrote:
>
> >     Listen 192.168.223.40:80
> >     Listen 192.168.223.41:8080
> >
> > <Virtualhost 192.168.223.40:80>
> >     servername        www.domain1.com
> >     serveralias        domain1.com, *.domain1.com
> > </Virtualhost>
> >
> > <Virtualhost 192.168.223.41:8080>
> >     servername        www.domain2.com
> >     serveralias        domain2.com, *.domain2.com
> > </Virtualhost>
>
> This is basically correct, except that the ServerAlias lines don't do
> anything.  They are only relevant in the case of name-based virtual hosts.
>
> > I intended have nothing listed for the Documentroot, since is only the
> > configuration phase, and it defaults the Apache documentation page.
>
> You should put a DocumentRoot in both vhosts, even if it is the same as
> the main server DocumentRoot.
>
> >
> > I get successfully retrievet the default Apache page for DOMAIN1.  VIA
its
> > local address, as well as outside the LAN.  But thus far haven't had any
> > success "seeing" my DOMAIN2 internally or otherwise.
> >
> > Does IP Aliasing require that another "network" address be used?  (ie.
> > 192.168.223.40 & 192.168.224.40)
>
> No.
>
> > I suspect my issue lies within the IP
> > Aliasing.
> > I can successful ping the IP Alias address 192.168.223.41 locally. And
> > netstat reveals that both addresses/port are up & listening.
>
> >From the server, try
> telnet 192.168.223.41 8080
> GET / HTTP/1.0
> [enter][enter]
>
> If that gives you the page, then apache is working fine.  Try the same
> thing again from another machine on the LAN to see if it is a networking
> issue.
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] IP Aliasing & Virtual Hosting issue w/ Apache 2.0.48

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 25 Dec 2003, David wrote:

>     Listen 192.168.223.40:80
>     Listen 192.168.223.41:8080
>
> <Virtualhost 192.168.223.40:80>
>     servername        www.domain1.com
>     serveralias        domain1.com, *.domain1.com
> </Virtualhost>
>
> <Virtualhost 192.168.223.41:8080>
>     servername        www.domain2.com
>     serveralias        domain2.com, *.domain2.com
> </Virtualhost>

This is basically correct, except that the ServerAlias lines don't do
anything.  They are only relevant in the case of name-based virtual hosts.

> I intended have nothing listed for the Documentroot, since is only the
> configuration phase, and it defaults the Apache documentation page.

You should put a DocumentRoot in both vhosts, even if it is the same as
the main server DocumentRoot.

>
> I get successfully retrievet the default Apache page for DOMAIN1.  VIA its
> local address, as well as outside the LAN.  But thus far haven't had any
> success "seeing" my DOMAIN2 internally or otherwise.
>
> Does IP Aliasing require that another "network" address be used?  (ie.
> 192.168.223.40 & 192.168.224.40)

No.

> I suspect my issue lies within the IP
> Aliasing.
> I can successful ping the IP Alias address 192.168.223.41 locally. And
> netstat reveals that both addresses/port are up & listening.

>From the server, try
telnet 192.168.223.41 8080
GET / HTTP/1.0
[enter][enter]

If that gives you the page, then apache is working fine.  Try the same
thing again from another machine on the LAN to see if it is a networking
issue.

Joshua.

---------------------------------------------------------------------
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