Nginx is throwing an 403 Forbidden on Static Files

后端 未结 6 1727
野性不改
野性不改 2020-12-14 19:10

I have a django app, python 2.7 with gunicorn and nginx.

Nginx is throwing a 403 Forbidden Error, if I try to view anything in my static fo

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-14 19:30

    The minimum fix that worked for me is:

    sudo chmod -R 664 /home/ubuntu/virtualenv/myapp/myapp/homelaunch/static/
    sudo chmod -R a+X /home/ubuntu/virtualenv/myapp/myapp/homelaunch/static/
    

    (BTW, in my case the static folder is called collected_static)

提交回复
热议问题