使用apache2部署Django项目

时间:2017-06-24 14:05:00

标签: django python-3.x apache2 mod-wsgi wsgi

有人可以帮助我为什么不起作用? (我的项目名称是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 个答案:

答案 0 :(得分:0)

我发现了一些有趣的问题:

1 - 首先应该设置服务器来监听我要在其上部署的端口!

gen_fsm

2 - 使用 WSGIDaemonProcess 应该像我为我的apache2配置编写的这个示例

Listen 8000

那就是它!

相关问题