--- myst: html_meta: "description": "" "property=og:description": "" "property=og:title": "" "keywords": "" --- # 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`: ```html %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 # 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 / # 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` ## Exercises ### 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? ````{dropdown} Solution :animate: fade-in-slide-down :icon: question 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: ```{code-block} ini :emphasize-lines: 4 [server:main] paste.server_factory = plone.recipe.zope2instance:main use = egg:plone.recipe.zope2instance#main listen = 0.0.0.0:8080 threads = 4 ``` ```` ### Exercise 2 Same task as in exercise 1. If instead you add an http-server section to `parts/instance/etc/zope.conf`: ```{code-block} html :emphasize-lines: 2-4 address 9080 ``` What do you expect to happen when executing `bin/instance fg`? ````{dropdown} Solution :animate: fade-in-slide-down :icon: question You will see an error because `http-server` is not known from Zope's `wsgischema.xml`: ```shell 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 ``` ````