7

While Zope 2.13 have native wsgi support, I haven't been able to find any documentation/deployment tutorial/article/blog yet.

Would anyone point/post a working example ?

quyetnd
  • 589
  • 3
  • 8

2 Answers2

5

The reason is that while Zope 2's WSGI support is a starting point, there are still lots of rough edges, and as a result, WSGI is not yet an officially supported or "recommended best practice" deployment option. However, you might find http://smith-li.com/wordpress/2011/05/31/plone-4-1-with-apache-and-mod_wsgi-sorta/ useful as a starting point.

Jon Stahl
  • 2,090
  • 10
  • 10
  • 2
    All true :-). Actually, I like http://nathanvangheem.com/news/running-plone-4-with-a-zope2-wsgi and https://github.com/hannosch/zope2-wsgi, the latter of which I based my work on. – aclark Dec 24 '11 at 04:06
4

Try the following:

The buildout referenced in that document (http://build.pythonpackages.com/buildout/plone/4.2.x) is as follows:

[buildout]
allow-hosts =
    *.plone.org
    *.python.org
extensions =
    buildout.bootstrap
    mr.developer
extends = http://dist.plone.org/release/4.2b1/versions.cfg
extends-cache = .
find-links = http://dist.plone.org/thirdparty/elementtree-1.2.7-20070827-preview.zip
parts =
    mod-wsgi
    plone
    wsgi-conf
versions = versions

[plone]
recipe = plone.recipe.zope2instance
eggs =
    PasteScript
    Pillow
    Plone
    Products.PloneHotfix20110928
    WebError
    repoze.retry
    repoze.tm2
    repoze.vhm
products =
user = admin:admin
scripts = paster

[versions]
distribute = 0.6.24
# Error: Setup script exited with error: src/config.h: No such file or directory
# Error: Couldn't install: pycrypto 2.4
pycrypto = 2.3
zc.buildout = 1.5.2

[mod-wsgi]
recipe = collective.recipe.modwsgi
eggs = ${plone:eggs}
config-file = plone.ini

[wsgi-conf]
recipe = collective.recipe.template
url = http://build.pythonpackages.com/buildout/plone/plone.ini.in
output = plone.ini

[versions]
Zope2 = 2.13.11

Please note that a newer Zope2 is used than the one that is likely to be shipped with Plone 4.2. This is due to the fact that the 2.13.11 release adds support for doing WSGI without requiring repoze.who for authentication (which effectively increases the "convenience factor" quite a bit.)

aclark
  • 4,345
  • 1
  • 19
  • 31
  • 1
    Thanks for the link aclark, I've just been able to make my instance work under wsgi using the buildout. Just a notice my Plone's builtin diazo stop working, and I have to use the wsgi middleware for theming. – quyetnd Dec 24 '11 at 13:13