[Zope] Re: Problems with Zope and Squid...

Tres Seaver tseaver at zope.com
Mon Oct 11 13:08:30 EDT 2004


Braun Brelin wrote:
> Hello all,
> 
> I'm having some problems trying to get Zope to work correctly with my
> Squid proxy cache.  
> 
> Specifics:
> 
> I'm running Zope 2.7.2 and Plone 2 on a Red Hat Linux 9 box. 
> I'm using squid 3 and squidguard to handle the URL rewriting. 
> 
> The rewriting rule in the SquidGuard.conf file looks like this: 
> 
> dbhome /var/lib/squidguard/db
>        logdir /var/log/squid
>        acl {
>            default {
>                redirect
> http://localhost:9080/VirtualHostBase/http/localhost:80/dms/VirtualHostRoot/%p
>             }
>        }
> 
> Where dms is the name of my plone portal. 
> 
> The error I'm getting from the Z2.log is: 
> 
> 127.0.0.1 - Anonymous [11/Oct/2004:17:49:17 +0100] "GET
> http://localhost/ HTTP/1.0" 404 1512 "" "Mozilla/5.0 (X11; U; Linux
> i686; en-US; rv:1.7) Gecko/20040616"127.0.0.1 - Anonymous
> [11/Oct/2004:17:49:18 +0100] "GET http://localhost/p_/ZopeButton
> HTTP/1.0" 304 308 "http://localhost/" "Mozilla/5.0 (X11; U; Linux i686;
> en-US; rv:1.7) Gecko/20040616"
> 
> Why am I getting a URL rewritten to look like localhost/p_/ZopeButton?
> 
> I'm getting the standard error page from zope: 
> 
> Site Error
> An error was encountered while publishing this resource. 
> 
> Resource not found
> 
> Sorry, the requested resource does not exist.
> 
> Check the URL and try again.
> 
> Resource: no default view (root default view was probably deleted)
> 
> 
> Anyone know what's going on here? 

  - Do you have a VirtualHostMonster instance in the root of your site?

  - Is squid expecting to run as a "reverse" proxy here?  The presence of
    the 'http://...' in the Z2.log suggests that Squid believes Zope to
    be a parent cache, rather than an origin server.

  - Can you test SquidGuard at the command line?  It should expect to
    read a line containing the requsted URL and some other data (I don't
    recall the syntax, but the Squid docs for redirectors would call it
    out) and return a single line for each line read.  E.g.::

    $ /path/to/squidguard
    http://www.example.com/index.html <other args here>
 
http://localhost:9080/VirtualHostBase/http/localhost:80/dms/VirtualHostRoot/index.html
    ^D


Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com



More information about the Zope mailing list