Имеется сайт на NodeJS фреймворке
AdonisJS. Все бы ничего, но при загрузке файлов свыше 2Мб сервер ложится на 502 ошибке. В лог пишет
2016/12/03 12:25:12 [error] 2034#2034: *2504 upstream prematurely closed connection while reading response header from upstream, client: 37.215.112.153, server: adonis.ml, request: "POST /manager/albums/1/ HTTP/1.1", upstream: "127.0.0.1:3000/manager/albums/1", host: "adonis.ml", referrer: "https://adonis.ml/manager/albums/1/"
Привожу весь файл конфигурации Nginx ( /etc/nginx/nginx.conf )
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
client_max_body_size 100M;
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 3600s;
types_hash_max_size 2048;
# server_tokens on;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
В настройках самого фреймворка стоит разрешение на загрузку файлов до 2Гиг
Помогите пожалуйста решить проблему 502
Конфиг хоста
server {
listen 443 ssl;
ssl on;
ssl_certificate /etc/letsencrypt/live/adonis.ml/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/adonis.ml/privkey.pem;
root /gopanel/sites/adonis_ml/public_html;
index index.php index.html index.htm;
server_name adonis.ml;
include /etc/roundcube/webmail_configuration;
include /etc/phpmyadmin/nginx.conf;
location / {
proxy_read_timeout 2400s;
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param HTTP_PROXY "";
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}