Digital Ocean Forbidden 您无权访问此资源

时间:2021-05-29 09:00:06

标签: python django apache2 digital-ocean

我正在使用 Django 我不知道如何设置配置文件 '''

  1. 别名 /static root/pixlfy/googlesheet/static 要求所有授权

    <Directory root/pixlfy/googlesheet/googlesheet>         <Files wsgi.py>
            Require all granted         </Files>    </Directory>
    
    
    WSGIDaemonProcess pixlfy python-home=root/pixlfy/projectenv
    

    python-path=root/pixlfy/googlesheet WSGIProcessGroup pixlfy WSGIScriptAlias / root/pixlfy/googlesheet/googlesheet/wsgi.py

    <Directory root/pixlfy/googlesheet/googlesheet>
        Order allow,deny
        Allow from all  </Directory>
    

'''

1 个答案:

答案 0 :(得分:0)

我建议您按照本教程进行操作:

https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-20-04

建议您创建另一个具有 sudo 权限的用户,并将您的网站放在该用户的主文件夹中。

这样您就不会在权限方面遇到任何问题。