我有一个带有 mod_wsgi 的 Pyramid 应用程序和 apache,我正试图让它们一起工作。这是我的 httpd.conf:
ServerRoot "/home/user/webapps/myapp/apache2"
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule wsgi_module modules/mod_wsgi.so
LoadModule authz_host_module modules/mod_authz_host.so
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedCustomLog /home/user/logs/user/access_myapp.log combined
ErrorLog /home/user/logs/user/error_myapp.log
KeepAlive Off
Listen 41121
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
WSGIDaemonProcess myapp processes=1 display-name=%{GROUP} python-path=/home/user/webapps/myapp/htdocs/lib/python2.4/site-packages/ threads=4
WSGIScriptAlias / /home/user/webapps/myapp/htdocs/pyramid.wsgi
<Directory /home/user/webapps/myapp/htdocs>
WSGIProcessGroup myapp
Order allow,deny
Allow from all
</Directory>
不幸的是,我收到一个服务器错误:AssertionError: The EvalException middleware is not used in a multi-process environment
谢谢!