【发布时间】:2018-06-26 04:08:20
【问题描述】:
我的环境:
ubuntu 12.04 / python3.6.4 / django 2.0 / apache 2.2.22
我想在 apache 上部署 newsite
我关注了django official
我想部署在
www.domainname.com/newsite/
我的 httpd.conf
<Directory /home/usr/project_name/project_name>
<Files wsgi.py>
Order deny,allow
Deny from all
</Files>
</Directory>
WSGIDaemonProcess site python-path=/home/usr/site
WSGIProcessGroup site
WSGIScriptAlias /newsite/ /home/usr/project_mame/project_name/wsgi.py
如果我在 python-home 中添加我的虚拟环境,我无法通过 configtest
我浏览 127.0.0.1 它显示 apache 'It works' 页面
但是 127.0.0.1/newsite 我刚刚得到了 403 禁止
日志:客户端被服务器配置拒绝:xxxxxx/xxxxxx/wsgi.py
【问题讨论】:
-
请注意,Ubuntu 12.04 已结束生命周期,不会收到安全更新。
-
我公司还在用 12.04 ..... :'(
标签: python django apache ubuntu