* 13 prematurely closed connection up while reading the response header from the upstream

I am setting up for the first time and getting this error. A Nginx-enabled site configuration is as follows:

#tream component nginx needs to connect to
 upstream django1 {
#server 127.0.0.1:8001; # for a web port socket (we'll use this first)
server unix:///run/uwsgi/app/apps/sokcet.B;
 }

# configuration of the server
server {

# the port your site will be served on
listen 9000;

# the domain name it will serve for
server_name xxx.xxx.xx.xxx; # substitute your machine IP address or FQDN
charset     utf-8;

# max upload size
client_max_body_size 75M;   # adjust to taste

# Django media
#location /media  {
#    alias /path/to/your/mysite/media;  # your Django project media files - amend as required
#}

#location /static {
#    alias /path/to/your/mysite/static; # your Django project static files - amend as required
#}

# Finally, send all non-media requests to the Django server.
location / {
    uwsgi_pass  django1;
    include     /etc/nginx/uwsgi_params; # the uwsgi_params file you installed
    uwsgi_read_timeout 1800;
    uwsgi_send_timeout 600;
    proxy_read_timeout 600;
}
}

Uwsgi is running, but nginx gives this error. So kindly tell me what the problem is in my configuration.

+4
source share

Source: https://habr.com/ru/post/1674171/


All Articles