[Zope] ProxyPass and Virtual Subhosting
Norman Khine
norman@khine.net
Mon, 15 Oct 2001 22:13:04 +0100
Hello,
I have a question which may not be fully related to zope, but it is more to
do with the way apache is set up -- appologies in advance.
Here is what I am trying to do.
I want to be able to register 2 domains domain1.com and domain2.com. I want
both the domain names to point to the same public ip 300.300.300.1 I want
to have 3 Severs, Server A, Server B, and Server C. Server A is the only
server with a public IP(300.300.300.1) Server B and Server C have internal
IPs, 192.168.0.2 and 192.168..0.3
Now, Server A is to receive all the public request(technically it has to
since it has the public IP) for the domain domain1.com and domain2.com.
However I want to host domain1.com on Server B, and domain1.com on Server C.
I would like for Server A to take the request and then forward it on the
appropriate server.
Graphically it will look something like:
| Request from Internet
V
---------------------------
| public ip 300.300.300.1 |
---------------------------
|
|
---------------------------
| internal ip 192.168.0.1 |
---------------------------
|
______NETWORK__________________|__________________________________NETWORK___
___
| |
| |
--------------------------- ---------------------------
| internal ip 192.168.0.2 | | internal ip 192.168.0.3 |
--------------------------- ---------------------------
My Zope sever is running at 192.168.0.2 on port 8080 and I have at
192.168.0.3 a MySQL server, where as at my public ip/internal ip 192.168.0.1
I have apache running with the following configuration
NameVirtualHost 300.300.300.1:*
<VirtualHost www.domain2.net>
ServerName www.domain2.net
ServerAdmin admin@domain2.net
DocumentRoot /usr/local/etc/httpd/htdocs/
TransferLog /usr/local/etc/httpd/htdocs/logs/access_log
ErrorLog /usr/local/etc/httpd/htdocs/logs/error_log
<IfModule mod_proxy.c>
ProxyRequests On
ProxyPass / http://192.168.0.2:8080/Portal/
ProxyPassReverse / http://192.168.0.2:8080/Portal/
NoCache *
ProxyPass /misc_ http:/192.168.0.2:8080/misc_
ProxyPassReverse /p_ http://192.168.0.2:8080/p_
NoCache *
</IfModule>
</VirtualHost>
I hope this makes sense.
Thanks
Norman
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
zz/********/z/****\zzz|****\*\zz|*******|z
z/^^^^^^^^/z/******\zz|*^^^^|*|z|*|^^^^^|z norman khine
zzzzzz/**/z|**/^^\**|z|*|zzz|*|z|*|zzzzzzz mailto:norman@khine.net
zzzzz/**/zz|*|zzzz|*|z|****/*/zz|*****|zzz purley
z/******/zz|*|zzzz|*|z|*|^^zzzzz|*|^^^|zzz UK
zzZ/**/zzzz|**\^^/**|z|*|zzzzzzz|*|zzzzzzz
zz/******/zz\******/zz|*|zzzzzzz|*|*****|z
z/^^^^^^/zzzz\^^^^/zzz|^|zzzzzzz|^^^^^^^|z
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz