Re: [Zope] I have tried everything!!! Isn't it possible to host several domains in 1 Zope and have apache running ????
At 19:26 08-06-2001 +0200, you wrote:
And this is exactly what I have tried to do. Writing the ProxyPass rules i easy.
It's the part of the SiteRoot I don't understand (and that's the place I fail everytime *S*)
It's really easy. Even easier than the other posts suggest.
Let's say the site is called http://www.gitte.de on the IP 212.6.156.161
and your zope server runs on zope1:8080:
The Apache virtual host definitions would be:
<VirtualHost 212.6.156.161> ServerName www.gitte.de ServerAdmin webmaster@gitte.de ProxyPass / http://212.6.156.163:8080/ ProxyPassReverse / http://212.6.156.163:8080/ TransferLog /var/log/gitte.log </VirtualHost>
If you don't need separate logging, you can skip the TransferLog line ...
AFAIK you will not need the /p_ and /misc_ ones any more. Just try.
Then you go to your zope1:8080 and add a SiteRoot in the Root with following entries:
Title: Whateveryouwant Base: http://www.gitte.de Path: /
That's all. It will work the same if Zope does run on the same machine. Then it is not "zope1:8080" but "www.gitte.de:8080". If you want to point to a subdirectory, add the SiteRoot there and change the above ProxyPass lines, e.g. make it "ProxyPass / http://212.6.156.163:8080/gitte/".
Just make sure that you don't add or remove any "/", e.g. "ProxyPass / http://212.6.156.163:8080" would not work. The Zope server has to run in "standalone" mode with ZServer, not as a CGI module. Otherwise this would not work as advertised.
BTW: Of course you have to have a DNS server configured to point www.gitte.de to the IP 212.6.156.161. But I guess you know that one ... ;-)
Cheers
Joachim
Well .. I also have some php scripts that I still need to be able to use. They are stored in (if I use you example) www.gitte.de/zopefuncs. How do I make a ProxyPass rule so that every request for www.gitte.de/zopefuncs goes to the apache server ? Gitte
There are 2 ways that you can handle this. Create a another VH that you proxy pass the folder to before the proxy pass for your site. or place the alias above the proxypass statement. <IfModule mod_alias.c> Alias /zopefuncs/ /path/to/folder/zopefuncs/ </IfModule> GL... At 07:47 PM 6/8/2001 +0200, Gitte Wange wrote:
stinfo/zope>, <mailto:zope-request@zope.org?subject=unsubscribe> List-Archive: <http://lists.zope.org/pipermail/zope/> Date: Fri, 08 Jun 2001 19:47:06 +0200
At 19:26 08-06-2001 +0200, you wrote:
And this is exactly what I have tried to do. Writing the ProxyPass rules i easy.
It's the part of the SiteRoot I don't understand (and that's the place I fail everytime *S*)
It's really easy. Even easier than the other posts suggest.
Let's say the site is called http://www.gitte.de on the IP 212.6.156.161
and your zope server runs on zope1:8080:
The Apache virtual host definitions would be:
<VirtualHost 212.6.156.161> ServerName www.gitte.de ServerAdmin webmaster@gitte.de ProxyPass / http://212.6.156.163:8080/ ProxyPassReverse / http://212.6.156.163:8080/ TransferLog /var/log/gitte.log </VirtualHost>
If you don't need separate logging, you can skip the TransferLog line ...
AFAIK you will not need the /p_ and /misc_ ones any more. Just try.
Then you go to your zope1:8080 and add a SiteRoot in the Root with following entries:
Title: Whateveryouwant Base: http://www.gitte.de
Path: /
That's all. It will work the same if Zope does run on the same machine. Then it is not "zope1:8080" but "www.gitte.de:8080". If you want to point to a subdirectory, add the SiteRoot there and change the above ProxyPass lines, e.g. make it "ProxyPass / http://212.6.156.163:8080/gitte/".
Just make sure that you don't add or remove any "/", e.g. "ProxyPass / http://212.6.156.163:8080" would not work. The Zope server has to run in "standalone" mode with ZServer, not as a CGI module. Otherwise this would not work as advertised.
BTW: Of course you have to have a DNS server configured to point www.gitte.de to the IP 212.6.156.161. But I guess you know that one ... ;-)
Cheers
Joachim
Well .. I also have some php scripts that I still need to be able to use. They are stored in (if I use you example) www.gitte.de/zopefuncs. How do I make a ProxyPass rule so that every request for www.gitte.de/zopefuncs goes to the apache server ?
Gitte
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
---------------------------------------------------- Sherwood Robinson Hostmaster The Free Lance-Star/Internet Department srobinson@fredericksburg.com http://www.fredericksburg.com 616 Amelia St. Fredericksburg, VA 22401 540-374-5000 ext. 5657
Let's see if I understand your setup: - Zope behind Apache - Some content from Zope, some from Apache - More than one domain In this case, I recommend using Apache's mod_proxy and mod_rewrite modules together with Zope's VirtualHostMonster. This requires the following steps: 1. Set up Apache so that it has mod_proxy and mod_rewrite enabled. 2. Set up Zope, and choose a port number for it to serve requests on. Port 8080 is the default, and will be used in the examples below. 3. Add a VirtualHostMonster to the root of your Zope. Make up a unique name for it, and read the Add screen, but don't worry about it otherwise. 4. For each domain: 4a. Create a Folder in your Zope root named after the domain (this name is used in step 4e). 4b. Create a <VirtualHost> section in your Apache setup. 4c. In this section, turn on rewriting and set up rewrite logging. 4d. For each path that you want Apache to serve, add a rule that matches the path, leaves it unchanged, and stops rewriting. It will look like this: RewriteRule /apache_content - [L] 4e. Finally, add a rule that matches all remaining paths, rewrites them for the VirtualHostMonster, and sends them through mod_proxy. It will look like this: RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/ http/www.gitte.com:80/ gitte.com/VirtualHostRoot/$1 [P,L] *This is one line, not three, with no space between parts!* That's all. If your Zope isn't on the same machine as Apache, or isn't on port 8080, change the "localhost:8080". If you name your Zope Folder "www.gitte.com" or "gitte", use that instead of "gitte.com". If you make a <VirtualHost> for access through SSL, change the second part to "https/www.gitte.com:443/". Cheers, Evan @ digicool & 4-am
participants (3)
-
Evan Simpson -
Gitte Wange -
Sherwood Robinson