You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Matt Sergeant <ma...@sergeant.org> on 2000/04/27 19:13:29 UTC

mod_proxy and Name based Virtual Hosts

OK, just to get this onto a different subject line... I can't seem to get
mod_proxy to work on the front end with name based virtual hosts on the
backend, I can only get it to work if I have name based virtual hosts on
both ends. So I have a front end saying:

NameVirtualHost 194.70.26.133

<VirtualHost 194.70.26.133>
ServerName xml.sergeant.org
ProxyPass / http://xml.sergeant.org:8080/
ProxyPassReverse / http://xml.sergeant.org:8080/
</VirtualHost>
... etc, for all nbvh's

and almost the same on the backend:

NameVirtualHost 194.70.26.133

<VirtualHost 194.70.26.133>
ServerName xml.sergeant.org
DocumentRoot...
ErrorLog...
CustomLog...
</VirtualHost>
... etc, for all nbvh's.

It can't be this hard, can it? I just want my vhosts config on 1 server -
not both! And I don't want to be changing my setup - i.e. no mod_rewrite
to rewrite to DocRoot/hostname - that's just annoying!

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org


Re: mod_proxy and Name based Virtual Hosts

Posted by Matt Sergeant <ma...@sergeant.org>.
On Thu, 27 Apr 2000, Drew Taylor wrote:

> I'm not very skilled in this area, but it looks like you are proxying to
> a backend on port 8080, but you never specify port 8080 in the config
> for the backend... Perhaps this is it? Or did you leave out part of the
> backend config?

No - I just left that out - otherwise there would be a port conflict and
one of the httpds wouldn't start.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org


Re: mod_proxy and Name based Virtual Hosts

Posted by Drew Taylor <dt...@vialogix.com>.
I'm not very skilled in this area, but it looks like you are proxying to
a backend on port 8080, but you never specify port 8080 in the config
for the backend... Perhaps this is it? Or did you leave out part of the
backend config?

Matt Sergeant wrote:
> 
> OK, just to get this onto a different subject line... I can't seem to get
> mod_proxy to work on the front end with name based virtual hosts on the
> backend, I can only get it to work if I have name based virtual hosts on
> both ends. So I have a front end saying:
> 
> NameVirtualHost 194.70.26.133
> 
> <VirtualHost 194.70.26.133>
> ServerName xml.sergeant.org
> ProxyPass / http://xml.sergeant.org:8080/
> ProxyPassReverse / http://xml.sergeant.org:8080/
> </VirtualHost>
> ... etc, for all nbvh's
> 
> and almost the same on the backend:
> 
> NameVirtualHost 194.70.26.133
> 
> <VirtualHost 194.70.26.133>
> ServerName xml.sergeant.org
> DocumentRoot...
> ErrorLog...
> CustomLog...
> </VirtualHost>
> ... etc, for all nbvh's.
> 
> It can't be this hard, can it? I just want my vhosts config on 1 server -
> not both! And I don't want to be changing my setup - i.e. no mod_rewrite
> to rewrite to DocRoot/hostname - that's just annoying!

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/

Re: mod_proxy and Name based Virtual Hosts

Posted by Vivek Khera <kh...@kciLink.com>.
>>>>> "MS" == Matt Sergeant <ma...@sergeant.org> writes:


MS> Still doesn't solve the problem of editing only 1 config file, unless I
MS> generate a config file with perl :(


I don't think it is possible to do it such that you only have one
config file to edit.  Both sides need to know about the virtual hosts.


Re: mod_proxy and Name based Virtual Hosts

Posted by Matt Sergeant <ma...@sergeant.org>.
On Thu, 27 Apr 2000, Vivek Khera wrote:

> >>>>> "MS" == Matt Sergeant <ma...@sergeant.org> writes:
> 
> MS> OK, just to get this onto a different subject line... I can't seem to get
> MS> mod_proxy to work on the front end with name based virtual hosts on the
> MS> backend, I can only get it to work if I have name based virtual hosts on
> MS> both ends. So I have a front end saying:
> 
> I personally use name-based on the front end and port-based on the
> backend.  You have to do the virtualizing on the front end.

Still doesn't solve the problem of editing only 1 config file, unless I
generate a config file with perl :(

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org


Re: mod_proxy and Name based Virtual Hosts

Posted by Vivek Khera <kh...@kciLink.com>.
>>>>> "MS" == Matt Sergeant <ma...@sergeant.org> writes:

MS> OK, just to get this onto a different subject line... I can't seem to get
MS> mod_proxy to work on the front end with name based virtual hosts on the
MS> backend, I can only get it to work if I have name based virtual hosts on
MS> both ends. So I have a front end saying:

I personally use name-based on the front end and port-based on the
backend.  You have to do the virtualizing on the front end.