Привет! Настроил впервые reverse-proxy и ошибка «while reading response header from upstream» Второй день гуглю, ничего не подходит Сколько перебирал значения - тоже не помогает
log_error:
2019/01/23 00:20:03 [error] 8492#0: *155 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 7 in /usr/share/nginx/domain/domain.ru/www/folder/captcha/kcaptcha.php on line 85
PHP message: PHP Notice: Undefined offset: 4 in /usr/share/nginx/domain/domain.ru/www/folder/captcha/kcaptcha.php on line 85
PHP message: PHP Notice: Undefined offset: 6 in /usr/share/nginx/domain/domain.ru/www/folder/captcha/kcaptcha.php on line 85
PHP message: PHP Notice: Undefined offset: 6 in /usr/share/nginx/domain/domain.ru/www/folder/captcha/kcaptcha.php on line 85" while reading response header from upstream, client: clientip, server: domain.ru, request: "GET /folder/captcha/?PHPSESSID=f5ahqedddlrc7m2oiftql7g21o&tt=0.199709 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "domain.ru", referrer: "https://domain.ru/folder/register.php"
nginx-proxy:
server {
server_name domain.ru www.domain.ru;
charset UTF-8;
index index.php index.html index.htm;
listen 443 ssl http2;
listen [::]:443 ssl http2;
include "/etc/nginx/server_context.conf";
location /assets {
root /usr/share/nginx/static/mltworld;
#expires max;
}
location / {
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_http_version 1.1;
proxy_pass http://2.2.2.2:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header CF-Connecting-IP $remote_addr;
}
#####SSL#####
ssl_certificate "/etc/pki/nginx/cert/www.domain.ru.crt";
ssl_certificate_key "/etc/pki/nginx/private/www.domain.ru.key";
ssl_trusted_certificate "/etc/pki/nginx/pem/www.domain.ru.pem";
include "/etc/pki/nginx/ssl-stapling.conf";
#####SSL#####
}
server-context.conf:
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
#ngx_http_headers_module
add_header X-UA-Compatible "IE=Edge";
#Запрет на открытие в iframe
add_header X-Frame-Options SAMEORIGIN;
###ngx_http_core_module
client_max_body_size 10m;
client_body_buffer_size 16k;
client_header_buffer_size 2k;
large_client_header_buffers 4 8k;
client_body_timeout 60;
client_header_timeout 60;
send_timeout 60;
###ngx_http_proxy_module
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_buffer_size 8k;
proxy_buffers 8 8k;
#proxy_busy_buffers_size 64k; #proxy_buffer_size + proxy_buffers = proxy_busy_buffers_size
#proxy_temp_file_write_size 64k; #proxy_buffer_size + proxy_buffers = proxy_temp_file_write_size
#На proxy не нужна комперссия, тк статик файлы уже сжаты, а другие сжимаются на основном сервере
#include /etc/nginx/gzip-compression.conf;
nginx-web:
#WWW redirection NO WWW
server {
server_name www.domain.ru;
listen 80;
listen [::]:80;
return 301 http://domain.ru$request_uri;
}
server {
server_name domain.ru www.domain.ru;
charset UTF-8;
index index.php index.html index.htm;
disable_symlinks if_not_owner from=$root_path;
access_log /usr/share/nginx/domain/domain.ru/logs/domain.ru.access.log;
error_log /usr/share/nginx/domain/domain.ru/logs/domain.ru.error.log;
set $root_path /usr/share/nginx/domain/domain.ru/www;
root $root_path;
listen 80;
listen [::]:80;
include "/etc/nginx/server_context.conf";
include "/etc/nginx/location_context.conf";
location / {
try_files $uri $uri/ =404;
sla_pass main;
location / {
try_files $uri $uri/ /index.php?$uri&$args;
}
}
include /etc/nginx/php-fpm/default/php-fpm.conf;
}
php-fpm:
location ~ \.php$ {
try_files $uri =404;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_ignore_client_abort off;
#Закрывать ли соединение, если клиент не дождался ответа
#####TEST
fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_connect_timeout 150;
fastcgi_send_timeout 150;
fastcgi_read_timeout 150;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
}
Пошел спать парни впервые за сутки Надеюсь проснусь и вы уже на моем сервере чините мне и настраиваете облачный ДЦ....