在浏览器中,我收到“找不到文件”。提供了服务器日志和配置。我现在真的不知道该怎么做。
错误:
2018/04/24 14:00:46 [错误] 28717#28717:* 9 FastCGI发送到stderr: 从上游读取响应头时“主脚本未知”, 客户端:127.0.0.1,服务器:localhost,请求:“GET / HTTP / 1.1”, 上游:“fastcgi://127.0.0.1:9000”,主持人:“wasob.localhost”
wasob.localhost
server {
#Nginx should listen on port 80 for requests to yoursite.com
listen 80;
server_name wasob.localhost;
#Create access and error logs in /var/log/nginx
access_log /var/log/nginx/default.access_log;
error_log /var/log/nginx/wasob.error_log error;
root /var/www/html/wasob/;
#The homepage of your website is a file called index.php
index index.php;
location / {
try_files $uri $uri/ index.php
}
#Specifies that Nginx is looking for .php files
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
#if (!-f $document_root$fastcgi_script_name) {
# return 404;
#}
fastcgi_index index.php;
# SCRIPT_FILENAME parameter is used for PHP FPM determining
# the script name. If it is not set in fastcgi_params file,
# i.e. /etc/nginx/fastcgi_params or in the parent contexts,
# please comment off following line:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_param HTTP_PROXY "";
# include the fastcgi_param setting
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}
}
错误和配置位于https://gist.github.com/skinuxgeek/4d4f86490f87805d1781782670551db9