在使用Nginx部署Django之后,将图像上载到管理后台,并查看PermissionError
在使用Nginx部署Django之后,将图像上载到管理后台,并查看PermissionError 我是部署在CentOS上的Django项目,文件夹的权限已更改为777,权限问题仍然存在 以下是Nginx的.conf配置文件在使用Nginx部署Django之后,将图像上载到管理后台,并查看PermissionError,django,nginx,Django,Nginx,在使用Nginx部署Django之后,将图像上载到管理后台,并查看PermissionError 我是部署在CentOS上的Django项目,文件夹的权限已更改为777,权限问题仍然存在 以下是Nginx的.conf配置文件 # mysite_nginx.conf # the upstream component nginx needs to connect to upstream django { server 127.0.0.1:8001; # for a web port soc
# mysite_nginx.conf
# the upstream component nginx needs to connect to
upstream django {
server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
listen 80;
server_name www.xxxxxx.com;
charset utf-8;
client_max_body_size 75M;
location /static {
alias /var/www/WebSite/static;
}
location /media {
alias /var/www/WebSite/static/essay;
}
location / {
uwsgi_pass 127.0.0.1:8080;
include /etc/nginx/uwsgi_params;
}
location /static/ {
root /var/www/ngstatic/;
break;
}
}
这是一条错误消息
PermissionError at /admin/home/essay/10/change/
[Errno 13] Permission denied: '/var/www/WebSite/static/essay/20190912140555.jpg'
Request Method: POST
Request URL: http://119.3.**.***/admin/home/essay/10/change/
Django Version: 2.2.5
Exception Type: PermissionError
Exception Value:
[Errno 13] Permission denied: '/var/www/WebSite/static/essay/20190912140555.jpg'
Exception Location: /usr/local/lib/python3.5/dist-packages/django/core/files/storage.py in _save, line 266
Python Executable: /usr/local/bin/uwsgi
为什么使用端口8081的上游标签和uwsgi_通道中的上游标签使用8080?为什么使用端口8081的上游标签和uwsgi_通道中的上游标签使用8080