Django-Apache Web服务器设置正确吗?

我目前正在使用Ubuntu 16.04设置VPS Web服务器。 我已经安装了所有软件包,Python3,PIP和Django等

我已经设置了根目录,例如 根  -venv  -thesantaletter(项目)  -字母(app)

我的conf文件设置如下,但是当我访问此文件时,我收到403禁止错误,我不确定问题是否出在我拥有项目的文件夹体系结构的方式上,因为我从未部署过django应用程序已存在。

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    <Directory ~/santa/thesantaletter/>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>

    WSGIDaemonProcess santa python-path=~/santa/ python-home=~/santa/venv
    WSGIProcessGroup santa
    WSGIScriptAlias / ~/santa/thesantaletter/wsgi.py

</VirtualHost>

当我在端口8000上运行开发服务器时,它运行良好,并且没有任何问题-这使我相信问题出在Apache方面(这不是我的最佳选择)。我已经搜索并尝试了许多不同的conf和文件夹结构,但无济于事,这是我的最后选择。

可以查看文件夹的文件权限

Django-Apache Web服务器设置正确吗?

sarah928 回答:Django-Apache Web服务器设置正确吗?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3100597.html

大家都在问