L
L
lucifer_jr2019-03-23 12:06:34
Nginx
lucifer_jr, 2019-03-23 12:06:34

Why does nginx respond with connection refused on all connection attempts?

Before that I had php7.0, but this kind of problem arose after installing php7.3 and reinstalling nginx.
netstat -nlp
5c95f769427a8504113323.png
systemctl status nginx.service
5c95f77092e9a398222122.png
curl -v 127.0.0.1
5c95f7767ddc0947299362.png
Configuration file /etc/nginx/sites-available/default:

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /var/www;

        index index.php index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_pass unix:/run/php/php7.3-fpm.sock;
        }
        location ~ /\.ht {
                deny all;
        }
}

I would be grateful for help)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sowander, 2019-03-24
@Sowander

check the php-fpm.conf settings,
pay attention to the listen and user parameters there
(listen must match /run/php/php7.3-fpm.sock from nginx)
(user must match the user from the main nginx.conf config)
see logs and not in curl (if logs are not maintained, set them in the configs for fpm and nginx )
here is a command to help you search / filter by logs
cat /var/log/nginx/error.log | grep 'search word like date or ip'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question