【问题标题】:Digital Ocean Forbidden You don't have permission to access this resourceDigital Ocean Forbidden 您无权访问此资源
【发布时间】:2021-08-17 08:00:10
【问题描述】:

我正在使用 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>
    

'''

【问题讨论】:

  • 你的操作系统是什么?你用的是 Ubuntu 20.04 吗?

标签: python django apache2 digital-ocean


【解决方案1】:

我建议你遵循这个教程:

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

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

这样你就不会在特权方面遇到任何麻烦。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-05-07
    • 2021-12-27
    • 2021-04-03
    • 2021-07-03
    • 2022-08-03
    • 2022-08-02
    • 1970-01-01
    • 2020-05-30
    相关资源
    最近更新 更多