ngninx афигел пишет 502 ошибку

J
На сайте с 28.05.2019
Offline
14
511

как победить 502 ошибку и чтоб пхп работал

suffix
На сайте с 26.08.2010
Offline
325
#1

1. Благодарю за безмерно большое количество информации по которым мы должны сделать выводы.

2. Пока вывод только про эту ошибку есть - надо писать "офигег" а не "афигел"

Клуб любителей хрюш (https://www.babai.ru)
J
На сайте с 28.05.2019
Offline
14
#2

; Start a new pool named 'www'.

; the variable $pool can be used in any directive and will be replaced by the

; pool name ('www' here)

[www]

; Per pool prefix

; It only applies on the following directives:

; - 'access.log'

; - 'slowlog'

; - 'listen' (unixsocket)

; - 'chroot'

; - 'chdir'

; - 'php_values'

; - 'php_admin_values'

; When not set, the global prefix (or /usr) applies instead.

; Note: This directive can also be relative to the global prefix.

; Default Value: none

;prefix = /path/to/pools/$pool

; Unix user/group of processes

; Note: The user is mandatory. If the group is not set, the default user's group

; will be used.

user = www-data

group = www-data

; The address on which to accept FastCGI requests.

; Valid syntaxes are:

; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on

; a specific port;

; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on

; a specific port;

; 'port' - to listen on a TCP socket to all addresses

; (IPv6 and IPv4-mapped) on a specific port;

; '/path/to/unix/socket' - to listen on a unix socket.

; Note: This value is mandatory.

listen = /run/php/php7.2-fpm.sock

; Set listen(2) backlog.

; Default Value: 511 (-1 on FreeBSD and OpenBSD)

;listen.backlog = 511

; Set permissions for unix socket, if one is used. In Linux, read/write

; permissions must be set in order to allow connections from a web server. Many

; BSD-derived systems allow connections regardless of permissions.

; Default Values: user and group are set as the running user

; mode is set to 0660

listen.owner = www-data

listen.group = www-data

;listen.mode = 0660

; When POSIX Access Control Lists are supported you can set them using

; these options, value is a comma separated list of user/group names.

; When set, listen.owner and listen.group are ignored

;listen.acl_users =

;listen.acl_groups =

; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.

; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original

; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address

; must be separated by a comma. If this value is left blank, connections will be

; accepted from any ip address.

; Default Value: any

;listen.allowed_clients = 127.0.0.1

; Specify the nice(2) priority to apply to the pool processes (only if set)

; The value can vary from -19 (highest priority) to 20 (lower priority)

; Note: - It will only work if the FPM master process is launched as root

; - The pool processes will inherit the master process priority

; unless it specified otherwise

; Default Value: no set

; process.priority = -19

; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user

; or group is differrent than the master process user. It allows to create process

; core dump and ptrace the process for the pool user.

; Default Value: no

; process.dumpable = yes

; Choose how the process manager will control the number of child processes.

; Possible Values:

; static - a fixed number (pm.max_children) of child processes;

; dynamic - the number of child processes are set dynamically based on the

; following directives. With this process management, there will be

; always at least 1 children.

; pm.max_children - the maximum number of children that can

; be alive at the same time.

; pm.start_servers - the number of children created on startup.

; pm.min_spare_servers - the minimum number of children in 'idle'

; state (waiting to process). If the number

; of 'idle' processes is less than this

; number then some children will be created.

; pm.max_spare_servers - the maximum number of children in 'idle'

; state (waiting to process). If the number

; of 'idle' processes is greater than this

; number then some children will be killed.

; ondemand - no children are created at startup. Children will be forked when

; new requests will connect. The following parameter are used:

; pm.max_children - the maximum number of children that

; can be alive at the same time.

; pm.process_idle_timeout - The number of seconds after which

;

baas
На сайте с 17.09.2012
Offline
161
#3

Структурно, понятно, сформулируйте свой вопрос!

Вижу пол конфига php-fpm и что дальше?

Настройка BSD систем. (https://www.fryaha.ru) Знание сила, незнание Рабочая сила!
Николай Серваков
На сайте с 12.11.2017
Offline
16
#4

Наиболее частые причины возникновения ошибки bad gateway:

Какой-то из сервисов просто выключен. Необходимо перезапустить Apache, PHP-FPM либо другой сервис, с которым работает Nginx.

Какой-то из сервисов недоступен по сети. Если Nginx находится на одном сервере, а PHP-FPM или Apache на другом, то ошибка 502 может возникнуть, если между серверами нет связи. Сделайте ping и убедитесь, что проблемы нет.

Настройка лент WPGrabber (http://wpgrabber-tune.blogspot.com) Настрою парсер контента shs.parser (https://sites.google.com/view/shs-parser-sotbit) Сотбит
S
На сайте с 30.09.2016
Offline
469
#5
wpgrabber:
Если Nginx находится на одном сервере, а PHP-FPM или Apache на другом

Да у него всё на домашнем компе. Пацан установил убунту и развлекается.

Отпилю лишнее, прикручу нужное, выправлю кривое. Вытравлю вредителей.
R
На сайте с 08.07.2019
Offline
8
#6

Да, конечно, ТС просто мастер задавать вопросы))) Немного подробностей явно не помешало бы. Вот вам инструмент для мониторинга работы сайта host-tracker.com/InstantCheck/Create и статистика вам в помощь. На сервере или хсотинге что-то меняли или обновляли? Не мог же просто так сайт прилечь🙄

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий