6. What's left in zope.conf?#

What's possible in zope.conf when using the WSGIPublisher is defined in wsgischema.xml in the Zope package. It is a subset of what is possible in zope.conf with ZServer. The schema file for the latter can be found in the ZServer package.

Let's look at a zope.conf generated by plone.recipe.zope2instance:

%define INSTANCEHOME /home/thomas/devel/plone/minimal52/parts/instance
instancehome $INSTANCEHOME
%define CLIENTHOME /home/thomas/devel/plone/minimal52/var/instance
clienthome $CLIENTHOME
debug-mode off
security-policy-implementation C
verbose-security off
default-zpublisher-encoding utf-8
    CHAMELEON_CACHE /home/thomas/devel/plone/minimal52/var/cache
<zodb_db main>
    # Main database
    cache-size 30000
    # Blob-enabled FileStorage database
      blob-dir /home/thomas/devel/plone/minimal52/var/blobstorage
      # FileStorage database
        path /home/thomas/devel/plone/minimal52/var/filestorage/Data.fs
    mount-point /
<zodb_db temporary>
    # Temporary storage database (for sessions)
      name temporary storage for sessioning
    mount-point /temp_folder
    container-class Products.TemporaryFolder.TemporaryContainer
python-check-interval 1000
  • database configuration

  • instancehome, clienthome, environment

  • debug-mode on|off

  • security-policy-implementation C

  • verbose-security off

  • default-zpublisher-encoding utf-8

  • python-check-interval

  • pid-filename

6.1. Exercises#

6.1.1. Exercise 1#

Let's say you temporarily want Plone to listen on port 9080 instead of the default 8080. How could you do this without changing the buildout configuration?


The http server address would be the address Waitress is listening on configured in parts/instance/etc/wsgi.ini. Change the line starting with listen in the first section of the file:

paste.server_factory = plone.recipe.zope2instance:main
use = egg:plone.recipe.zope2instance#main
listen =
threads = 4

6.1.2. Exercise 2#

Same task as in exercise 1. If instead you add an http-server section to parts/instance/etc/zope.conf:

  address 9080
<zodb_db main>

What do you expect to happen when executing bin/instance fg?


You will see an error because http-server is not known from Zope's wsgischema.xml:

Error: unknown type name: 'http-server'
(line 12 in file:///home/thomas/devel/plone/minimal52/parts/instance/etc/zope.conf)
For help, use bin/instance -h