2009/2/26 Alessandro Molina <[email protected]>: > > Hi all, has anybody any experience in deploying repoze.plone under mod_wsgi? > > I'm trying to move from a paster serve to mod_wsgi. Under the paster > server the zope and plone instance works correctly. But under mod_wsgi > every object has an empty docstring and I had to patch things like > RAMCache.__doc__ or it didn't start. Anyway zope doesn't publish objects > with empty docstrings so I'm unable to run the plone instance. > > I'm using mod_wsgi/2.3 and python2.4 > > My vhost configuration is > > WSGIPythonHome /var/venv/plone > WSGIDaemonProcess zope threads=1 processes=1 maximum-requests=10000 > python-path=/var/venv/plone/lib/python2.4/site-packages > > <VirtualHost *:80> > ServerName blah.domain.org > DocumentRoot "/var/venv/plone/htdocs" > > WSGIScriptAlias /zope /var/venv/plone/bin/zope2.wsgi > > WSGIProcessGroup zope > WSGIApplicationGroup %{GLOBAL} > > WSGIPassAuthorization On > SetEnv HTTP_X_VHM_HOST http://blah.domain.org/zope > SetEnv PASTE_CONFIG /var/venv/plone/etc/zope2.ini > > <IfModule mpm_peruser_module> > ServerEnvironment apache apache > </IfModule> > > <Directory "/var/venv/plone"> > Options Indexes FollowSymLinks > AllowOverride All > Order allow,deny > Allow from all > </Directory> > </VirtualHost> > > Running the same instance with "bin/paster serve etc/zope2.ini" works > perfectly, the problems appears only when running from mod_wsgi. > > I'm able only to get a lot of this errors in my apache logs: > > [Wed Feb 25 23:59:38 2009] [error] [client X.X.X.X] HTTPForbidden: 403 > Forbidden > [Wed Feb 25 23:59:38 2009] [error] [client X.X.X.X] Access was denied to > this resource. > [Wed Feb 25 23:59:38 2009] [error] [client X.X.X.X] The object at > http://blah.domain.org/zope/manage has an empty or missing docstring. > Objects must have a docstring to be published. > > > Any suggestion?
Sounds like you have set: WSGIPythonOptimize 2 when you shouldn't have. See: http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonOptimize That or PYTHONOPTIMIZE environment variable is being set and inherited by Apache process when started and it similarly is configured for greatest level of optimisation. The greatest level of optimisation is a problem because doc strings are stripped. The only other option is that you are somehow running of pregenerated .pyo files which were compiled with highest level of optimisation. BTW, if you have mod_python loaded by Apache as well, in that case mod_python sets up Python. Thus also ensure you haven't set PythonOptimize directive for mod_python, although don't think it can enable highest level of optimisation. Anyway, this is the only way I know that doc strings can be stripped. Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
