Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
117 views
in Technique[技术] by (71.8m points)

python - How to install & configure mod_wsgi for py3

I installed & configured mod_wsgi for python2.7 but now I would also like to have mod_wsgi for py3

I'm in ubuntu 12.04 My apache conf file looks like this for py2.7 :

<Directory /var/www/vhosts/my_web>
    WSGIProcessGroup my_web
    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all
</Directory>

Now I would like to install mod_wsgi for python3.

I think I have to do apt-get install libapache2-mod-wsgi-py3

But I can't find any instruction on how to configure mod_wsgi for py3. a) Can I keep mod_wsgi for py2.7 or do I need to remove it for apache to work with mod_wsgi_py3? b) What do I need to include in my apache conf?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

sudo apt-get install libapache2-mod-wsgi-py3

This will replace libapache2-mod-wsgi and will restart the apache service.

More specific instructions (Django) are available for here: https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...