Nginx+Php-Fpm - FastCGI sent in stderr: “Primary script unknown” upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host:

Подскажите пожалуйста, сломал себе весь мозг, установил nginx, прописал свой хост, но при открытии выдается ошибка

File not found.

В логах nginx ошибок нет, в логах самого сайта ошибка

2021/04/03 23:42:46 [error] 23692#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.12.50, server: cyprym.online, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "site.com"

Конфиг nginx и сайта прилагаю. Чувствую что где-то есть дебильная ошибка, но не пойму где. php-fpm настроен на nginx (пользователь и группа стоят nginx, так же listen.owner = nginx listen.group = nginx listen.mode = 0660 ) Версия Centos7 nginx 1.16.1 php 7.4 seelinux Disabled

Конфиг nginx

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;


events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    log_format scripts '$document_root$fastcgi_script_name > $request';
    limit_req_zone $binary_remote_addr zone=images:10m rate=100r/s;
    limit_req_zone $binary_remote_addr zone=php:10m rate=5r/s;
    access_log  /var/log/nginx/access.log  main;
    access_log  /var/log/nginx/scripts.log scripts;
    
    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

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

    fastcgi_cache_key "$request_method|$host|$request_uri";
    
    
    
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80;
        listen       [::]:80;
        #server_name  _;
        root         /web/sites/site.com/www;


       

        location / {
        }

        error_page 404 /404.html;
        location = /404.html {
        }

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        }
        
    }
}

Конфиг сайта

    fastcgi_cache_path /web/sites/site.com/.image levels= keys_zone=donateImage:32m inactive=60d;
fastcgi_cache_path /web/sites/site.com/.ajax levels= keys_zone=donateAjax:32m inactive=1d max_size=50m;

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

    server_name site.com www.site.com;

    root /web/sites/site.com/www;

    access_log /web/sites/site.com/log/www.access.log;
    error_log /web/sites/site.com/log/www.error.log;

    index index.php;

    keepalive_timeout 60;
    charset utf-8;

    location ~ /\.
    {
        return 302 /;

        deny all;
        access_log off;
        log_not_found off;
    }

    location = /favicon.ico
    {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt
    {
        log_not_found off;
        access_log off;
    }

    location = /ads.txt
    {
        log_not_found off;
        access_log off;
    }

    location ~* \.(htm|html|jpeg|jpg|gif|png|ico|css|bmp|swf|js|json|flv|mp4|avi|mpg|mpeg|wmv|rm|ogg|mp3|wma|wav|m3u|zip|rar|exe|7z|tgz|gz|bz2|tar|chm|fb2|doc|docx|xls|xlsx|ppt|ppm|rtf|pdf|djv|eot|otf|svg|ttf|woff|woff2)$
    {
        expires max;
        if_modified_since before;
    }

    location ~* \.(ht|log|sql|tpl|config)   { deny all; }

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

    location ~ /(config.php|app|admin/app|logging)
    {
        error_page 500 502 503 504 402 403 404 /?page=404;

        deny all;
        internal;
    }

    location ~ /upload/tmp/
    {
        return 302 /;
    }

    location ~ /(image|upload/skin|upload).php
    {
        try_files $fastcgi_script_name =404;

        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;

        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;

        fastcgi_param SCRIPT_FILENAME       $document_root$fastcgi_script_name;
        fastcgi_param PATH_TRANSLATED       $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO             $fastcgi_script_name;

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

        limit_req zone=images burst=100 nodelay;

        fastcgi_pass unix:/var/run/php-fpm.sock;

        set $skip_cache 0;
        fastcgi_cache_valid 200 301 302 304 60d;
        
        fastcgi_hide_header "Set-Cookie";

        fastcgi_buffering on;
        fastcgi_cache_bypass $skip_cache;
        fastcgi_no_cache $skip_cache;
        fastcgi_cache donateImage;
        #add_header skip_cache $skip_cache;
        add_header X-Cache $upstream_cache_status;
    }

    location ~ \.php$
    {
        try_files $fastcgi_script_name =404;
        fastcgi_pass unix:/var/run/php-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_buffering on;
        fastcgi_read_timeout 150;
        fastcgi_temp_path /web/sites/site.com/.temp;
        fastcgi_pass_header "X-Accel-Expires";
    }
}

Буду признателен любой помощи и тыканьем носа в возможные банальные и тупые ошибки. Добавлю. Читал тут, но в части не понял. и большинство ответов к сожалению мне не помогло.


Ответы (0 шт):