Есть приложение, которое по запросу пользователя открывает в новом окне некий текст. Пробовала его запускать на одном сервере (на нем стоит только Apache
), все проходит нормально, текст выгружается. При попытке запустить его на другом (стоит связка nginx + Apache
) выходит ошибка 502 Bad Gateway
.
В логах значится, что она выходит из-за этого WSARecv() failed (10054: Удаленный хост принудительно разорвал существующее подключение)
. Подскажите, пожалуйста, чем она может быть вызвана? что nginx
так не нравится???
Лог nginx
:
2016/02/18 12:12:39 [debug] 9380#8020: select event: fd:364 wr:0
2016/02/18 12:12:39 [debug] 9380#8020: select timer: 500
2016/02/18 12:12:40 [debug] 9380#8020: select ready 1
2016/02/18 12:12:40 [debug] 9380#8020: select read 364
2016/02/18 12:12:40 [debug] 9380#8020: *222 post event 00910CB0
2016/02/18 12:12:40 [debug] 9380#8020: timer delta: 453
2016/02/18 12:12:40 [debug] 9380#8020: posted event 00910CB0
2016/02/18 12:12:40 [debug] 9380#8020: *222 delete posted event 00910CB0
2016/02/18 12:12:40 [debug] 9380#8020: *222 http upstream request: "/site/config/get_text.php?prescript_id=755"
2016/02/18 12:12:40 [debug] 9380#8020: *222 http upstream process header
2016/02/18 12:12:40 [debug] 9380#8020: *222 malloc: 00962008:4096
2016/02/18 12:12:40 [debug] 9380#8020: *222 WSARecv: fd:364 rc:-1 0 of 4096
2016/02/18 12:12:40 [error] 9380#8020: *222 WSARecv() failed (10054: Удаленный хост принудительно разорвал существующее подключение) while reading response header from upstream, client: 85.113.60.113, server: server_name.ru, request: "GET /site/config/get_text.php?prescript_id=755 HTTP/1.1", upstream: "http://127.0.0.1:80/site/config/get_text.php?prescript_id=755", host: "server_name.ru", referrer: "http://server_name.ru/site/site.php"
Настройки nginx
:
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#17.02.2016
client_max_body_size 10m;
client_body_timeout 6m;
client_header_timeout 6m;
send_timeout 6m;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 10.0.0.4:80;
server_name server_name.ru;
#charset koi8-r;
location ~ \.(png|gif|jpg|jpeg|ico|css|js|txt|wsdl)(\?\w+)?$ {
root c:/vhost/server_name.ru.ru/web;
index index.php;
}
location / {
proxy_connect_timeout 600;
proxy_read_timeout 600;
#17.02.2016
proxy_send_timeout 600;
#17.02.2016
proxy_pass http://127.0.0.1:80;
proxy_set_header Host $host;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}