Linux — php `connect () не удалось` на Centos 7.3

Я развернул проект php на centos 7.3 есть ошибка connect() failed ,

nginx а также php а также mariadb запущен, и я могу получить доступ к странице приветствия nginx.

[root@demo ~]# systemctl list-unit-files --type=service | grep enabled
//...
mariadb.service                               enabled
mysql.service                                 enabled
mysqld.service                                enabled
nginx.service                                 enabled
php-fpm.service                               enabled
//...

Затем я загружаю проект php на этот сервер Centos.

Конфигурация nginx выглядит так: /etc/nginx/conf.d/default.conf

location ~ \.php$ {
root           /var/www/project/public;
#fastcgi_pass   unix:/run/php-fpm.sock;
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
include        fastcgi_params;
}

Конфигурация PHP выглядит так: /etc/php-fpm.d/www.conf

#listen = /run/php-fpm.sock
listen = 127.0.0.1:9000

ошибка в /var/log/nginx/error.log:

//error of using `unix:/run/php-fpm.sock`:
connect() to unix:/run/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, upstream: "fastcgi://unix:/run/php-fpm.sock:"
//error of `using 127.0.0.1:9000`:
connect() failed (111: Connection refused) while connecting to upstream, upstream: "fastcgi://127.0.0.1:9000"

Что я должен делать?

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector