P
P
Programep2017-11-09 22:20:54
PHP
Programep, 2017-11-09 22:20:54

How to fix 500 error when requesting nginx to fastcgi in yii2?

Please tell me what could be the cause of the error (copied from nginx/error.log):

connect() failed (111: Connection refused) while connecting to upstream, client: [ip], server: localhost, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000 ", host: "[ip]"

php-fpm logs do not show any errors.
In the php-fpm config, I specified the value of the listen parameter: 127.0.0.1:9000
In the nginx config for php processing, I specified:
location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass 127.0.0.1:9000;
        try_files $uri =404;
    }

OS: Centos.
nginx/1.12.2 installed from the repository.
php-fpm built from source.
Config for php was taken from the recommendations for the yii2 framework

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arman, 2017-11-09
@Programep

overloaded php-fpm? on unix sockets the same story?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question