Nginx: PHP nunca se procesa. Los archivos HTML funcionan bien

Nginx: PHP nunca se procesa. Los archivos HTML funcionan bien

cuando ingreso archivos PHP, se cargan para siempre. Pero no aparece en el navegador. Después de unos minutos, el navegador llega al tiempo de espera.

Los archivos HTML se muestran/procesan correctamente.

Aquí está mi servidor virtual:

server {
    listen 80;
    
        server_name localhost;

    root /var/www/site;
    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
    }
}

Y aquí están las cosas más importantes en www.conf:

listen = /var/run/php/php7.2-fpm.sock
user = www-data
group = www-data

En php.ini tengo:

cgi.fix_pathinfo=0

Por supuesto, reinicié php y nginx. No tengo idea de cual es el problema

Versiones:

nginx version: nginx/1.18.0 (Ubuntu)
PHP 7.2.34-36+ubuntu20.04.1+deb.sury.org+1 (cli) (built: Oct 28 2022 18:25:54) ( NTS )

Alguien puede ayudarme porfavor?

Otros datos solicitados en los comentarios: nginx:conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;


#upstream php {
                #this should match value of "listen" directive in php-fpm pool
 #       server unix:var/run/php-fpm.so;
#       server 127.0.0.1:9000;
  #  }

        ##
        # Virtual Host Configs
        ##

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}

fastcgi.conf

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  REQUEST_SCHEME     $scheme;
fastcgi_param  HTTPS              $https if_not_empty;

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;



ls -la ../sites-available/
total 12
drwxr-xr-x 2 root root 4096 lis 30 22:02 .
drwxr-xr-x 8 root root 4096 lis 30 22:39 ..
-rw-r--r-- 1 root root  552 lis 30 22:02 site


ls -la ../sites-enabled/
total 8
drwxr-xr-x 2 root root 4096 lis 30 20:10 .
drwxr-xr-x 8 root root 4096 lis 30 22:39 ..
lrwxrwxrwx 1 root root   28 lis 30 18:17 site -> ../sites-available/site

información relacionada