Running 2 instances of Zope on Apache
Hi, I am having trouble trying to get apache to use sub domains for my 2 instances of zope. I want test.server name for one sub domain adn live.server for the other. The first sub domain for test instance of zope. The second sub domain for the lvie instance of zope. Anyone done this before? Can you show me an example of apache config file? Thanks -- View this message in context: http://www.nabble.com/Running-2-instances-of-Zope-on-Apache-tf1998979.html#a... Sent from the Zope - General forum at Nabble.com.
What's your apache config? I suggest that you use ProxyPass. Something like this will work fine: <VirtualHost IP.OF.YOUR.SERVER> ServerName dev.yoursite.com ServerAdmin ian.ripping@cfh.nhs.uk ProxyPass / http://localhost:9080/VirtualHostBase/http/dev.yoursite.com:80/zopefolder/Vi... ProxyPassReverse / http://localhost:9080/VirtualHostBase/http/dev.yoursite.com:80/zopefolder/Vi... ProxyPass /misc_ http://localhost:9080/misc_ ProxyPass /p_ http://localhost:9080/p_ ErrorLog /var/log/apache2/dev.yoursite.com_error.log CustomLog /var/log/apache2/dev.yoursite.com_access.log combined </VirtualHost> <VirtualHost IP.OF.YOUR.SERVER> ServerName www.yoursite.com ServerAdmin ian.ripping@cfh.nhs.uk ProxyPass / http://localhost:8080/VirtualHostBase/http/www.yoursite.com:80/zopefolder/Vi... ProxyPassReverse / http://localhost:8080/VirtualHostBase/http/www.yoursite.com:80/zopefolder/Vi... ProxyPass /misc_ http://localhost:8080/misc_ ProxyPass /p_ http://localhost:8080/p_ ErrorLog /var/log/apache2/www.yoursite.com_error.log CustomLog /var/log/apache2/www.yoursite.com_access.log combined </VirtualHost> You'll need to enable mod_proxy for your apache and you'll need to run two Zopes on the same server. One on port 8080 and one on port 9080. All the values I chose are all example values that you can play with. Best of luck! ianripping wrote:
Hi,
I am having trouble trying to get apache to use sub domains for my 2 instances of zope.
I want test.server name for one sub domain adn live.server for the other. The first sub domain for test instance of zope. The second sub domain for the lvie instance of zope.
Anyone done this before? Can you show me an example of apache config file?
Thanks
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
I have tried using the exaplme provided but having no luck. This is my standard config file: <VirtualHost *:80> ServerAdmin ian.ripping@cfh.nhs.uk ServerName commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/commsg6lds:80/extranet/VirtualHos... [L,P] </VirtualHost> I am using rewrite rule and this works for just the internal address http://commsg6lds How would I configure this for http://live.commsg6lds Do I have to enable NameVirtualHost? What should I have for listen? Currently: Listen 80 -- View this message in context: http://www.nabble.com/Running-2-instances-of-Zope-on-Apache-tf1998979.html#a... Sent from the Zope - General forum at Nabble.com.
What does your RewriteRule Log tell you? http://betabug.ch/zope/witch Check out that site to help you write it out ;) Regards, Liew On 7/26/06, ianripping <ian.ripping@cfh.nhs.uk> wrote:
I have tried using the exaplme provided but having no luck.
This is my standard config file:
<VirtualHost *:80> ServerAdmin ian.ripping@cfh.nhs.uk ServerName commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/commsg6lds:80/extranet/VirtualHos... [L,P] </VirtualHost>
I am using rewrite rule and this works for just the internal address http://commsg6lds
How would I configure this for http://live.commsg6lds Do I have to enable NameVirtualHost? What should I have for listen? Currently: Listen 80 -- View this message in context: http://www.nabble.com/Running-2-instances-of-Zope-on-Apache-tf1998979.html#a... Sent from the Zope - General forum at Nabble.com.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
How about something like this:: <VirtualHost *:80> ServerAdmin ian.ripping@cfh.nhs.uk ServerName live.commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/live.commsg6lds:80/extranet/Virtu... [L,P] </VirtualHost> <VirtualHost *:80> ServerAdmin ian.ripping@cfh.nhs.uk ServerName dev.commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:9080/VirtualHostBase/http/dev.commsg6lds:80/extranet/Virtua... [L,P] </VirtualHost> What way live.commsg61ds points to zope on port 8080 and dev.commsg61ds points to another zope on port 9080 ianripping wrote:
I have tried using the exaplme provided but having no luck.
This is my standard config file:
<VirtualHost *:80> ServerAdmin ian.ripping@cfh.nhs.uk ServerName commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/commsg6lds:80/extranet/VirtualHos... [L,P] </VirtualHost>
I am using rewrite rule and this works for just the internal address http://commsg6lds
How would I configure this for http://live.commsg6lds Do I have to enable NameVirtualHost? What should I have for listen? Currently: Listen 80
-- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com
I think this might be working but cant tell. Do I have to do something with my windows host file on my server to make these addresses naviagable? -- View this message in context: http://www.nabble.com/Running-2-instances-of-Zope-on-Apache-tf1998979.html#a... Sent from the Zope - General forum at Nabble.com.
It works! I had to change the <VirtualHost *:80> entried to <VirtualHost dev.commsg6lds> & <VirtualHost live.commsg6lds> Also had add IP addresses and domains to windows hosts file. Thanks for all the help! <VirtualHost dev.commsg6lds> ServerAdmin ian.ripping@... ServerName dev.commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:9080/VirtualHostBase/http/dev.commsg6lds:80/test/VirtualHos... [L,P] </VirtualHost> <VirtualHost live.commsg6lds> ServerAdmin ian.ripping@... ServerName live.commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/live.commsg6lds:80/extranet/Virtu... [L,P] </VirtualHost> -- View this message in context: http://www.nabble.com/Running-2-instances-of-Zope-on-Apache-tf1998979.html#a... Sent from the Zope - General forum at Nabble.com.
ianripping wrote at 2006-7-26 01:30 -0700:
... <VirtualHost *:80> ServerAdmin ian.ripping@cfh.nhs.uk ServerName commsg6lds RewriteEngine On RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/commsg6lds:80/extranet/VirtualHos... [L,P] </VirtualHost>
I am using rewrite rule and this works for just the internal address http://commsg6lds
How would I configure this for http://live.commsg6lds Do I have to enable NameVirtualHost? What should I have for listen? Currently: Listen 80
You really should read Apache's "NameVirtualHost" documentation... -- Dieter
ianripping wrote at 2006-7-25 08:37 -0700:
I am having trouble trying to get apache to use sub domains for my 2 instances of zope.
I want test.server name for one sub domain adn live.server for the other. The first sub domain for test instance of zope. The second sub domain for the lvie instance of zope.
Read about "Named Virtual Hosts" in the Apache documentation. -- Dieter
participants (4)
-
Dieter Maurer -
ianripping -
KE Liew -
Peter Bengtsson