linuxnginxbad-gateway

Nginx Bad Gateway with .pdf files


I'm trying to upload/download a .pdf file in Nginx, but it's returning error 502, before the proccess, the program insert data in mysql, and it's normal, only when trying to upload a file.

/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:
 }
}

I have tried another posts in stackoverflow, but nothing work.

Thanks


Solution

  • I tried, and works

    sudo chown myusername:www-data