[ZDP] Robert OConnor's FAQ contribution

Martijn Faassen M.Faassen@vet.uu.nl
Thu, 11 Mar 1999 15:44:02 +0100


Hi there,

I took Robert OConnor's entry and tried to edit it for inclusion in the
FAQ. I changed things quite a bit, and I wanted to run it by the group
before I include it.

Here it comes (please pay special attention to any FIXME's).

Martijn

-----

* What's up with the name of the root folder? How can I change it?

    There are different concepts at play here. 

    * The name the root folder has in the navigation frame (to the
      left in the management screen). Often, the name of the root
      folder is left blank. In the current Zope Manager's Guide the
      name of this folder is 'Plutonia'.
  
    * The webserver Zope is running under (ZopeHTTPServer, ZServer,
      Apache, etc) can be viewed as giving a name to the root
      folder. For instance, if your Zope site is under the URL
      'http://www.yourserver.com/Zope', you can consider 'Zope' to the
      be name of the root folder.
    
    * The 'title' property of the root folder. This is the name that
      will appear as the title of the web page when you browse to the
      root folder (unless your 'index_html' is a DTML Document that
      overrides the 'title' property).

    It is not possible to rename the navigation frame name of the root
    folder inside Zope. The name of the root folder can be changed
    inside the web server however; it is the 'SCRIPT_NAME' your
    webserver uses to access Zope. In ZServer and ZopeHTTPServer the
    default for this is an empty string, since they both normally
    serve only a single published module (though both can serve
    multiple ones too).

    ZopeHTTPServer has options to set 'SCRIPT_NAME' with command line
    arguments. In case of ZServer, you can change 'SCRIPT_NAME' in the
    file 'zope_handler.py'. [FIXME: if you change script name in these
    servers, does the URL change?]

    Here is a set of rules for Apache that changes SCRIPT_NAME::

        # Zope configuration maps /Zope/ to the Zope.cgi CGI script
        RewriteEngine on 
        # change the URL to Plutonia, and also set SCRIPT_NAME
        RewriteRule ^/Plutonia/(.*) /Zope/$1 [e=SCRIPT_NAME:Plutonia] 
        # the normal Zope rewrite rules
        RewriteCond %{HTTP:Authorization}  ^(.*) 
        # all on a single line
        RewriteRule ^/Zope/(.*)
/usr/local/apache/share/cgi-bin/Zope.cgi/$1
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]