Welcome to Squishdot Websites Squishdot How-To
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


Squishdot, Zope, Apache Rewrite, VHM interactions
Websites Posted by on Monday September 04, 04:26PM, 2006
from the Stubbed my toes as I approach a site... dept.
Ok, all is loaded, I'm running SUSE LINUX 9.3 with its Zope 2.7.4, Apache 2.0.53, BIND, and Squishdot 1.5.0(from changes.txt). The issue is accessing a Squishdot site within my Zope instance. I setup a site one level below the Zope root in a folder. Thus its URI is 'afolder/mysquishdot'. I want to address it in the brower this way..
http://www.website.com/mysquishdot/. Of course I have to use Apache2's mod_proxy and mod_rewrite. I've tried writing a RewriteRule this way...


RewriteRule ^/mysquishdot/$ http://192.168.1.64:8080/VirtualHostBase/http/www.wolterworks.net:80/afolder/mysquishdot/VirtualHostRoot/$1 [L,P]

So it gets the main page index_html which _mostly_ renders but the Squishdot image at the top reports the infamous 404 message in the Apache log files

/mysquishdot/ HTTP/1.1" 200 32690
then...
/Images/advert_img HTTP/1.1" 404 3943
/Images/sitetitle_img HTTP/1.1" 404 3943
/TopicImages/squishdot_img HTTP/1.1" 404 3949

The RewriteRule relies on /mysquishdot/ leading the URL which /Images/ is lacking. The RewriteRule correctly does not activate. So the next rule does activate which does not redirect to the /afolder/mysquishdot URI.

I can acesss the site by typing...
http://www.website.com/afolder/mysquishdot
.. and it comes up in all its glory. The ^/(.*) 2nd rule is working, good for this way accessing.

Well, I want to avoid the performance hit of the VHM. Further, I want to install multiple sites just to add some challenge to this. I am using a singe IP address and name based virtual hosting through Apache.

Does anyone have any insight as to how to make RewriteRules work for this application.




Squishdot within Plone? | apache proxying  >

 

Related Links

The Fine Print: The following comments are owned by whoever posted them.
( Reply )

eh?
by on Tuesday September 05, 09:53AM, 2006
OK, for starters, "performance hit of the VHM"? What performance hit are you referring to?

Other than that, the rewrite rule you're looking for is:

RewriteRule ^/mysquishdot(.*)$ http://192.168.1.64:8080/VirtualHostBase/http/www.wolterworks.net:80/afolder/VirtualHostRoot/_vh_mysquishdot$1 [L,P]

cheers,

Chris
[ Reply to this ]
  • Re: eh?
    by on Thursday September 07, 01:28AM, 2006
    Eh. Are you one of my Canadian friends? Eh.

    Thank you for your reply it set me on to a working access. I took your suggestion and made a single change in the VirtualHostBase portion

    RewriteRule... .../VirtualHostBase/.../afolder/mysquish/...
    that is I added /mysquish/ and it worked. I'll be testing that more later today with additional examples. As far as testing I should also try to figure out some useful example site code/objects to test accessing virtual sites within a Zope instance(s) to be more familar.

    Now I'm wondering about the "_vh_" you added. I looked through the online Zope Book and a general Zope.org and Google search and have not turned anything up. Can you give me some background or a lead to where this is documented?

    Last I'm going to have to lookup where I got the impressions about VHM performance. As I recall it's within one of the serveral Zope & Plone books I have. Thank you for your help.

    [ Reply to this ]
    • ...
      by on Thursday September 07, 06:34AM, 2006
      I don't have a clue what the Canadian comment is all about...

      Glad the VHM thing worked out for you, it's a pretty standard part of any Zope setup. Once you have it working, I doubt you'll need to test it that much, it "just works".

      The VHM performance thing is rubbish, I'd be very interested in seeing what caused you to get concerned about it.
      [ Reply to this ]
      • Re: eh?
        by on Thursday September 07, 04:27PM, 2006
        I just spotted a portion of the Zope Book 2.6 online about VHM titled "Virtual Hosting Services". I found a reference to "_vh_" in the last two paragraphs and it states,..

        "If you insert VirtualHostRoot, followed by one or more path elements that start with _vh_, then these elements will be ignored during traversal and then added (without the _vh_) to the start of generated URLs. For instance, a request for "/a/VirtualHostRoot/_vh_z/" will traverse "a" and then generate URLs that start with /"

        My copy of the book is from 2002 and does not have that chapter.

        I've looked through a few of my Zope/Plone books and have yet to find a reference to VHM performance. I'll keep looking.

        The Eh is about a form of speech in Canada. It is common for Canadians to speak a sentence and then say "eh". This either as a excalmation mark, "!", or as a way to ask a question, "eh?". Sometimes it sounds like a replacement for a period at the end of a sentence.


        [ Reply to this ]
        • Re: eh?
          by on Monday September 11, 11:53AM, 2006
          Yeah, funny that, things changing in 4 years ;-)

          Surprisingly, a 2002 edition of a book about a piece of software is likely to be out of date, no?

          Chris
          [ Reply to this ]

 
The Fine Print: The following comments are owned by whoever posted them.
( Reply )

Powered by Zope  Squishdot Powered
  "Any system that depends on reliability is unreliable." -- Nogg's Postulate
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 , ©2000-2002 .