简体   繁体   中英

Getting 504 Gateway Time-out nginx/1.18.0 (Ubuntu) in django nginx

I am facing problems launching my django app in digitalocean. I have done all the needful but I am quite sure I made error some where. Below is my nginx configuration file. What could be the problem. Thanks alot. PLease I would also love to know how to access nginx error log file through command line.

server {

server_name server_Ip;

location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
    root /home/username/myproject/smsdigo;
}

    location /media/ {
    root /home/username/myproject/smsdigo;
}

      location /locale/ {
    root /home/ebong/myproject/smsdigo;
}

location / {
    include proxy_params;
    proxy_pass http://unix:/run/gunicorn.sock;
}


}
   server {

listen 80;

client_max_body_size 3000M;
client_body_buffer_size 3000M;
client_body_timeout 120;

}

Problably you need increase fastcgi timeout directives: Try 60s or more. For example:

server{
  fastcgi_read_timeout 60s;
  fastcgi_send_timeout 60s;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM