如何用python3.4绑定apache?

时间:2015-08-13 05:29:58

标签: python django apache

我尝试bind apache server with python 3.4 . So, I have edited httpd.conf`,如下所示。

WSGIScriptAlias / /home/eachone/Project/MW_Service/MW_Service/wsgi.py
WSGIDaemonProcess MW_Service python-path=/home/eachone/Project/MW_Service:/usr/local/lib/python3.4/site-packages
WSGIProcessGroup MW_Service

<Directory /home/eachone/Project/MW_Service/MW_Service>
<Files wsgi.py>
    Allow from all
</Files>
</Directory>

Alias /static/ /home/eachone/Project/MW_Service/static/
<Directory /home/eachone/Project/MW_Service/static>
    Allow from all
</Directory>

然后我重新开始apache web server。然后我访问了网络服务。 我收到了这条消息:

  

服务暂时不可用   由于维护停机或容量问题,服务器暂时无法为您的请求提供服务。请稍后再试。&#39;

所以,我指的是/var/log/httpd/error_log。见下文

[Thu Aug 13 14:18:06 2015] [notice] Apache/2.2.15 (Unix) DAV/2 mod_wsgi/4.4.13 Python/2.6.6 configured -- resuming normal operations
[Thu Aug 13 14:18:11 2015] [error] [client 2xx.xxx.xxx.xxx] (13)Permission denied: mod_wsgi (pid=2977): Unable to connect to WSGI daemon process 'MW_Service' on '/etc/httpd/logs/wsgi.2974.0.1.sock' as user with uid=48.
[Thu Aug 13 14:18:13 2015] [error] [client xxx.xxx.xxx.xxx] (13)Permission denied: mod_wsgi (pid=2978): Unable to connect to WSGI daemon process 'MW_Service' on '/etc/httpd/logs/wsgi.2974.0.1.sock' as user with uid=48.

在error_log中,加载了Python 2.6.6。但我想使用3.4。我该如何解决这个问题?

0 个答案:

没有答案