有人可以帮助我为什么它不起作用?(我的项目名称是IKH(我正在使用Ubuntu 16.04 LTS,Apache2,Python3
ServerAdmin webmaster@localhost
DocumentRoot /var/www/ikh
WSGIDaemonProcess ikh python-path=/var/www/ikh/ python-home=/var/www/ikh/.env
WSGIProcessGroup ikh
WSGIScriptAlias / /var/www/ikh/ikh/wsgi.py
<Directory /var/www/ikh/ikh>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
我发现一些有趣的问题:
1-首先应该设置服务器以侦听我要在其上部署的端口!
Listen 8000
2-要使用 WSGIDAEMONPROCESS 应该喜欢此示例,我为我的Apache2 Configuration编写它
WSGIDaemonProcess ikh python-path=/var/www/ikh python-home=/var/www/ikh/env/lib/python3.5/site-packages
那就是!