ProxyPass weirdness with Plone
I am very new to Zope, and in fact came to it via Plone. I've set up Plone on my test server and can access it via port 8080 OK. I've been working to get it running via Apache on port 80, and have created a ProxyPass directive and set up VHM so that I can use VirtualHostBase to present the URL I want. My ProxyPass is set up thus: http://localhost:8080/VirtualHostBase/http/hudson.DouganConsulting.com:80/ where hudson is my test box (on its own lan segment). The issue I am seeing is that when I connect to the Plone home page, and log in, I get the logged in successfully message, but if I try any of the page links (e.g. "my preferences"), I am presented with the login screen, and if I enter it again, I keep looping around. I can successfully connect using localhost:8080 so it seems to be an issue with ProxyPass/VHM. My server is running th Mitel SME Server distro (which is based on RH 7.3). I would appreciate any insights you can provide. Thanks, -- Des Dougan
On Fri, 2003-04-18 at 23:47, Des Dougan wrote:
I am very new to Zope, and in fact came to it via Plone.
Welcome
I've set up Plone on my test server and can access it via port 8080 OK. I've been working to get it running via Apache on port 80,
An excellent plan.
and have created a ProxyPass directive and set up VHM so that I can use VirtualHostBase to present the URL I want. My ProxyPass is set up thus:
http://localhost:8080/VirtualHostBase/http/hudson.DouganConsulting.com:80/
Four comments: 1. ProxyPass typically requires a ProxyPassReverse. 2. RewriteRule is a bit more flexible than ProxyPass. 3. You'll want a VirtualHostRoot somewhere in that URL. 4. You probably want to serve something other than Zope's root. Assuming you have mod_rewrite (you probably do) I'd comment out the ProxyPass directive and try: RewriteEngine on RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/ hudson.DouganConsulting.com/path/to/plone_root/VirtualHostRoot/$1 [L,P] Where everything between RewriteRule and [L,P] should be on one line, no space between http/ and hudson. HTH, Dylan
Dylan, Many thanks for your reply. Dylan Reinhardt wrote:
Four comments: 1. ProxyPass typically requires a ProxyPassReverse.
Yes - I have one. I did not refer to it on the assumption that it is the most common usage. Apologies for the confusion.
2. RewriteRule is a bit more flexible than ProxyPass.
Yes, so I understand. I haven't yet tried it due to a specific of my distro. The Mitel SME Server dynamically builds the various virtual host statements in the httpd.conf via its configuration database. I haven't quite worked out the best way to add a RewriteRule.
3. You'll want a VirtualHostRoot somewhere in that URL.
I've tried both with and without. The last information I checked (in the Zope Book) seemed to indicate I wouldn't need it as I have only one domain. That said, I have tried it a number of different ways, and still get the same problem.
4. You probably want to serve something other than Zope's root.
I did wonder about this, although none of the docs I have read so far mention it specifically as a bad practice. At this point, I am using only the admin user, which as far as I could see is served from the root. Apart from the flexibility of managing multiple domains, should I wish to do that in the future, is there any other reason for not using the root?
Assuming you have mod_rewrite (you probably do) I'd comment out the ProxyPass directive and try:
RewriteEngine on RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/ hudson.DouganConsulting.com/path/to/plone_root/VirtualHostRoot/$1 [L,P]
Where everything between RewriteRule and [L,P] should be on one line, no space between http/ and hudson.
I'll give that a try. Many thanks, Des -- Des Dougan
Dylan Reinhardt wrote:
RewriteEngine on RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/ hudson.DouganConsulting.com/path/to/plone_root/VirtualHostRoot/$1 [L,P]
Where everything between RewriteRule and [L,P] should be on one line, no space between http/ and hudson.
I've created a RewriteRule successfully, and tested it. I found that I get the same problem as originally noted. I am assuming that it is because I had not specified a folder below the Zope root, so I have created one in ZMI, which correctly displays (after updating the rewrite, of course). However, I haven't got as far as testing the login problem, as I need to figure out which objects from the Zope root I need to populate my folder with so that I get the Plone menus. A project for tomorrow! Many thanks for your help. Now that I have created the folder (I've just realized that perhaps I should have created a Plone Site - I'll try that too), I assume that creating a VHM mapping (I'm using SiteAccessEnhanced) could take the place of the RewriteRule in httpd.conf (assuming I've read the docs correctly)? Cheers, Des -- Des Dougan
On Sat, 2003-04-19 at 23:46, Des Dougan wrote:
Dylan Reinhardt wrote:
RewriteEngine on RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/ hudson.DouganConsulting.com/path/to/plone_root/VirtualHostRoot/$1 [L,P]
Where everything between RewriteRule and [L,P] should be on one line, no space between http/ and hudson.
I've created a RewriteRule successfully, and tested it. I found that I get the same problem as originally noted. I am assuming that it is because I had not specified a folder below the Zope root, so I have created one in ZMI, which correctly displays (after updating the rewrite, of course).
So far so good.
However, I haven't got as far as testing the login problem, as I need to figure out which objects from the Zope root I need to populate my folder with so that I get the Plone menus. A project for tomorrow!
I'm not sure what that would be, aside from making sure that the CMF- & Plone-related products are actually installed.
I assume that creating a VHM mapping (I'm using SiteAccessEnhanced) could take the place of the RewriteRule in httpd.conf (assuming I've read the docs correctly)?
Yes and no. If you're running Zope on port 80 with nothing in front of it, VHM mappings can approximate the virtual hosting behavior of Apache. I'd only recommend this for small scale systems that aren't hosting sensitive or critical data. If Apache on 80 is a given in your environment, it all but certain that you'll want to use Apache RewriteRule or ProxyPass directives instead of VHM mappings. Just to be clear, you'll want a VHM object installed either way. HTH, Dylan
Dylan, Thanks again for your note. Dylan Reinhardt wrote:
However, I haven't got as far as testing the login problem, as I need to figure out which objects from the Zope root I need to populate my folder with so that I get the Plone menus. A project for tomorrow!
I'm not sure what that would be, aside from making sure that the CMF- & Plone-related products are actually installed.
Well, if I have my main site in a folder below the Zope root, I assume that I'd have to tell it what content to place there, so in my case, using Plone, wouldn't it be necessary to create a Plone instance there? If I decide to host a different domain in a separate folder, I would imagine that I would want a separate Plone setup for that domain?
If Apache on 80 is a given in your environment, it all but certain that you'll want to use Apache RewriteRule or ProxyPass directives instead of VHM mappings. Just to be clear, you'll want a VHM object installed either way.
Hmmm, from the 2.6 Zope book: Virtual Host Monster Mappings Tab Use the Virtual Host Monster's Mappings tab to cause your URLs to be rewritten if: * You run a "bare" Zope without a front-end webserver like Apache. * You have one or more folders in your Zope that you'd like to publish as "http://some.hostname.com/" instead of "http://hostname.com/a/folder". That sounds like they are both usable, but mutually exclusive. I'm getting a bit ahead of myself here - I want to understand more of how to set Plone up before I get off on too many tangents. Regards, Des -- Des Dougan
On Sun, 2003-04-20 at 21:01, Des Dougan wrote:
Dylan Reinhardt wrote:
I'm not sure what that would be, aside from making sure that the CMF- & Plone-related products are actually installed.
To clarify... the above was in reference to your comment about copying objects from the root folder... I wasn't sure what objects you meant.
Well, if I have my main site in a folder below the Zope root, I assume that I'd have to tell it what content to place there, so in my case, using Plone, wouldn't it be necessary to create a Plone instance there?
Yes.
If I decide to host a different domain in a separate folder, I would imagine that I would want a separate Plone setup for that domain?
Most likely
Use the Virtual Host Monster's Mappings tab to cause your URLs to be rewritten if:
* You run a "bare" Zope without a front-end webserver like Apache. * You have one or more folders in your Zope that you'd like to publish as "http://some.hostname.com/" instead of "http://hostname.com/a/folder".
That sounds like they are both usable, but mutually exclusive.
You should infer an "and" between those bullet points. VHM mappings are only necessary if Zope is on 80 (running "bare") _and_ you want Zope to do virtual host rewriting. Running Zope behind Apache, VHM requires no configuration. Just install it and pass correctly-formed proxy requests... acquisition will do the rest.
I'm getting a bit ahead of myself here - I want to understand more of how to set Plone up before I get off on too many tangents.
Fair enough. Once Plone works from: server_ip:8080/path/to/plone then you'll be ready to worry about getting your Apache setup right. Dylan
participants (2)
-
Des Dougan -
Dylan Reinhardt