带有 .pdf 文件的 Nginx Bad Gateway

Nginx Bad Gateway with .pdf files

我正在尝试upload/download Nginx 中的.pdf 文件,但它返回错误 502,在处理之前,程序在 mysql 中插入数据,它是正常的,只有在尝试时上传文件。

/etc/nginx/sites-available/projectexample

server {
 listen 80;
 server_name xxx.xx.xxx.xxx;

 location / {
  uwsgi_pass unix:///home/user/projectexample/projectexample.sock
  include uwsgi_params:
 }
}

我已经在 Whosebug 中尝试过其他帖子,但没有任何效果。

谢谢

我尝试过,并且有效

sudo chown myusername:www-data