1.首先下载modwsgi 链接如下:
https://files.cnblogs.com/baoyiluo/mod_wsgi-3.4.zip
2.解压并安装mod_wsgi:
./configure make make install
- apxs: command not found
- $ sudo apt-get install apache2-threaded-dev
之后提示:/usr/lib/apache2/modules/mod_wsgi.so
3.配置apache配置文件:
Loadmodule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
WSGIScriptAlias / /opt/trunk/remote/wsgi.py
WSGIPythonPath /opt/trunk/
<Directory /opt/trunk/>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>