首页 > 解决方案 > 带有 .pdf 文件的 Nginx 错误网关

问题描述

我正在尝试在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:
 }
}

我在stackoverflow中尝试了其他帖子,但没有任何效果。

谢谢

标签: linuxnginxbad-gateway

解决方案


我试过了,而且工作

sudo chown myusername:www-data

推荐阅读