我的Ubuntu Apache Conf文件问题。 (禁止您无权访问此服务器上的/。)

时间:2015-02-07 19:44:24

标签: django apache python-2.7 ubuntu virtual-machine

以下是https://github.com/treeio/treeio的配置文件 我使用这种方法:http://goo.gl/KTdlUT,将treeio配置到我的基于Azure的Ubuntu VM,但它仍然说:禁止你没有权限访问/在这台服务器上。)

<virtualhost *:80>

ServerAdmin abcd@xyz.com

ServerName abcd.net

ServerAlias abcd.net

DocumentRoot "/home/User/treeio"

<Directory /home/Userk/treeio/>

<Directory /home/User/treeio/>

Order allow,deny
Allow from all

</Directory>

WSGIDaemonProcess treeio.djangoserver processes=2 threads=15 display-name=%{GRO$
WSGIProcessGroup treeio.djangoserver
WSGIScriptAlias / /home/User/treeio/wsgi
ErrorLog  "/home/User/treeio/log/error.log"

CustomLog "/home/User/treeio/log/access.log" combined

</virtualhost>

1 个答案:

答案 0 :(得分:0)

似乎有些配置更喜欢将Django项目安装在 / var / www / 目录中,即使到目前为止主页文件夹是推荐的位置。从安全角度来看,这似乎是有道理的。

此外,Microsoft提供了最简单的逐步说明,该说明实际上适用于Azure中的Unbunto 14.04:

http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-python-django-web-app-linux/