Mailing List Archive

Another question
Is there a way to tell virtual hosts to listen to a certain ip only and still use the name in the <VirtualHost www.domainname.com>?
Re: Another question [ In reply to ]
You could do ip address based virtual hosts

<VirtualHost 123.123.123.123>
DocumentRoot /www/foo/html
ServerName www.foo.com
ServerAdmin admin@foo.com
ErrorLog www/foo/logs/error_log
</VirtualHost>

Regards.
Lewis
----- Original Message -----
From: Paul Stephenson
To: users@httpd.apache.org
Sent: Friday, December 14, 2001 3:40 PM
Subject: Another question


Is there a way to tell virtual hosts to listen to a certain ip only and still use the name in the <VirtualHost www.domainname.com>?
RE: Another question [ In reply to ]
I thought about that, but I don't know if that will work for me. I was hoping to be able to use the same server name, but one would be only internal (on the internal nick) and the other would be external but both would have the same name.

Like, for people behind our firewall would hit the 172.16.0.25 address, and then the people from the web would hit the 65.200.234.xxx ip address. Is there any way to do this with apache. Also, I do understand that if I was ony running one webpage internally, I could just use IP based hosting, but we run two internal web pages. So I thought about being able to do a multiple NameVirtualHost idea, but there is no way to make sure certain requests bind to a particular ip address??? <<<----NOT sure if this is correct.

Paul
-----Original Message-----
From: Lewis Watson [mailto:lists@visionsix.com]
Sent: Fri 12/14/2001 11:03 PM
To: users@httpd.apache.org
Cc:
Subject: Re: Another question


You could do ip address based virtual hosts

<VirtualHost 123.123.123.123>
DocumentRoot /www/foo/html
ServerName www.foo.com
ServerAdmin admin@foo.com
ErrorLog www/foo/logs/error_log
</VirtualHost>

Regards.
Lewis
----- Original Message -----
From: Paul Stephenson <mailto:PStephenson@ficgroup.com>
To: users@httpd.apache.org
Sent: Friday, December 14, 2001 3:40 PM
Subject: Another question


Is there a way to tell virtual hosts to listen to a certain ip only and still use the name in the <VirtualHost www.domainname.com>?
Re: Another question [ In reply to ]
----- Original Message -----
From: "Paul Stephenson" <PStephenson@ficgroup.com>
To: <users@httpd.apache.org>
Sent: Saturday, December 15, 2001 1:34 PM
Subject: RE: Another question


> I thought about that, but I don't know if that will work for me. I was
hoping to be able to use the same server name, but one would be only
internal (on the internal nick) and the other would be external but both
would have the same name.
>
> Like, for people behind our firewall would hit the 172.16.0.25 address,
and then the people from the web would hit the 65.200.234.xxx ip address.
Is there any way to do this with apache.


I am not sure about the name part. As far as the same site....I think so.
Just use the same document root for each virtualhost. Is their a reason you
want the sites seperate yet the same. Maybe even consider a subdomain for
the internal site like wwy.foo.com. Maybe you could use an alias name for
each that points to the same but I really don't know. For the same document
root for each virtualhost use like:

<VirtualHost 65.200.234.xxx>
DocumentRoot /www/foo/html
ServerName www.foo.com
ServerAdmin admin@foo.com
ErrorLog www/foo/logs/error_log
</VirtualHost >
<VirtualHost 172.16.0.25>
DocumentRoot /www/foo/html
ServerName wwy.foo.com
ServerAdmin admin@foo.com
ErrorLog www/foo/logs/error_log
</VirtualHost>

hth,
Lewis





Also, I do understand that if I was ony running one webpage internally, I
could just use IP based hosting, but we run two internal web pages. So I
thought about being able to do a multiple NameVirtualHost idea, but there is
no way to make sure certain requests bind to a particular ip address???
<<<----NOT sure if this is correct.
>
> Paul
> -----Original Message-----
> From: Lewis Watson [mailto:lists@visionsix.com]
> Sent: Fri 12/14/2001 11:03 PM
> To: users@httpd.apache.org
> Cc:
> Subject: Re: Another question
>
>
> You could do ip address based virtual hosts
>
> <VirtualHost 123.123.123.123>
> DocumentRoot /www/foo/html
> ServerName www.foo.com
> ServerAdmin admin@foo.com
> ErrorLog www/foo/logs/error_log
> </VirtualHost>
>
> Regards.
> Lewis
> ----- Original Message -----
> From: Paul Stephenson <mailto:PStephenson@ficgroup.com>
> To: users@httpd.apache.org
> Sent: Friday, December 14, 2001 3:40 PM
> Subject: Another question
>
>
> Is there a way to tell virtual hosts to listen to a certain ip only and
still use the name in the <VirtualHost www.domainname.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
> 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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Another question [ In reply to ]
On Sat, Dec 15, 2001 at 01:34:58PM -0600, Paul Stephenson wrote:
> I thought about that, but I don't know if that will work for me. I was hoping to be able to use the same server name, but one would be only internal (on the internal nick) and the other would be external but both would have the same name.

You may want to look at the _default_ keyword for VirtualHosts.

http://httpd.apache.org/docs-2.0/vhosts/examples.html#default

This should allow you to setup a single virtualhost that will respond
to both the external and internal addresses.

-Ryan


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org