nginx — и еще один FastCGI, отправленный в stderr: «Основной сценарий неизвестен» при чтении заголовка ответа из апстрима,

возникли проблемы с файлом «not found» или с FastCGI, отправленным в stderr.

Из того, что я искал и исследовал по этой проблеме, это связано с тем, что 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;
}
}
}

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector