我已使用以下 buildout (通过http://build.pythonpackages.com/buildout/plone/4.2.x)配置 Plone :
[buildout]
allow-hosts =
*.plone.org
*.python.org
extensions = buildout.bootstrap
extends = http://dist.plone.org/release/4.2b1/versions.cfg
find-links = http://dist.plone.org/thirdparty/elementtree-1.2.7-20070827-preview.zip
parts =
mod-wsgi
plone
plone-mod-wsgi
plone-paste
versions = versions
[mod-wsgi]
recipe = collective.recipe.modwsgi
eggs = ${plone:eggs}
config-file = ${buildout:directory}/plone-mod-wsgi.ini
[plone]
recipe = plone.recipe.zope2instance
eggs =
PasteScript
Pillow
Plone
WebError
repoze.retry
repoze.tm2
repoze.vhm
products =
user = admin:admin
scripts = paster
[plone-mod-wsgi]
recipe = collective.recipe.template
url = http://build.pythonpackages.com/buildout/plone/plone-mod-wsgi.ini.in
output = ${buildout:directory}/plone-mod-wsgi.ini
[plone-paste]
recipe = collective.recipe.template
url = http://build.pythonpackages.com/buildout/plone/plone-paste.ini.in
output = ${buildout:directory}/plone-paste.ini
[versions]
distribute = 0.6.24
zc.buildout = 1.5.2
Zope2 = 2.13.11
使用以下配置的Apache:
<VirtualHost *:80>
…
# Use only 1 Python sub-interpreter. Multiple sub-interpreters
# play badly with C extensions.
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess plone user=aclark group=staff processes=1 \
threads=4 \
python-path=/srv/aclark.net/eggs
WSGIScriptAlias / /srv/aclark.net/parts/mod-wsgi/wsgi
<Directory /srv/aclark.net>
WSGIProcessGroup plone
Order allow,deny
Allow from all
SetEnv HTTP_X_VHM_HOST http://aclark.net
SetEnv HTTP_X_VHM_ROOT /Plone
</Directory>
</VirtualHost>
我的“声明性” WSGI 配置(由 /srv/aclark.net/parts/mod-wsgi/wsgi 调用)如下所示:
[app:plone]
use = egg:Zope2#main
zope_conf = /srv/aclark.net/parts/plone/etc/zope.conf
[pipeline:main]
pipeline =
egg:repoze.retry#retry
egg:repoze.tm2#tm
egg:repoze.vhm#vhm_xheaders
plone
# Begin logging configuration
[loggers]
keys = root
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
# End logging configuration
当您要求http://aclark.net/Plone时加载http://aclark.net,这一切都可以部分运作。但 Zope2 仍在生成以http://aclark.net/Plone开头的网址。
我错过了什么吗?或者这是一个 Zope2 错误(在 repoze.vhm 的情况下没有做正确的事情)
答案 0 :(得分:0)
怎么样:
[filter:vhm]
use = egg:repoze.vhm#vhm_explicit
host = http://www.example.com
root = /mysite
答案 1 :(得分:0)
对Zope2的完整WSGI支持仍在进行中。参见: