Nginx 还有另一个FastCGI发送到stderr中:“这是;“主脚本未知”;从上游读取响应头时,

Nginx 还有另一个FastCGI发送到stderr中:“这是;“主脚本未知”;从上游读取响应头时,,nginx,fastcgi,php,Nginx,Fastcgi,Php,在stderr中发送的“未找到文件”或FastCGI存在一些问题 根据我对这个问题的搜索和研究,这是由于fastcgi_param SCRIPT_FILENAME无法定位文件。我尝试过很多不同的组合,每次都有相同的结果 这是我的nginx.conf,如果有人有任何想法,我将不胜感激 user nginx; worker_processes 4; error_log /var/log/nginx/error.log; pid /run/nginx.pid; events

在stderr中发送的“未找到文件”或FastCGI存在一些问题

根据我对这个问题的搜索和研究,这是由于fastcgi_param SCRIPT_FILENAME无法定位文件。我尝试过很多不同的组合,每次都有相同的结果

这是我的nginx.conf,如果有人有任何想法,我将不胜感激

user  nginx;
worker_processes  4;

error_log  /var/log/nginx/error.log;

pid        /run/nginx.pid;

events {
worker_connections  1024;
}


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

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

access_log  /var/log/nginx/access.log  main;

sendfile        on;

keepalive_timeout  60;

include /etc/nginx/conf.d/*.conf;

index   index.php index.html index.htm;

server {
    listen  127.0.0.1:8080;
    root         /usr/share/nginx/html;
    location / {
    }

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

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

location ~ \.php$ {
  root   /usr/share/nginx/html;
  fastcgi_split_path_info  ^(.+\.php)(.*)$;
  fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  fastcgi_index  index.php;
  fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  include /etc/nginx/fastcgi_params;
}
}


server {
listen       443;

ssl                  on;
ssl_certificate      /etc/nginx/ssl/server.crt;
ssl_certificate_key  /etc/nginx/ssl/server.key;

ssl_session_timeout  5m;

ssl_protocols  SSLv2 SSLv3 TLSv1;
ssl_ciphers  HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers   on;

location / {
root   /usr/share/nginx/html;
index  index.php index.html index.htm;
}

location ~* ^/phpMyAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/;
}

location ~ \.php$ {
  root   /usr/share/nginx/html;
  fastcgi_split_path_info  ^(.+\.php)(.*)$;
  fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  fastcgi_index  index.php;
  fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  include /etc/nginx/fastcgi_params;
}
}
}