Php 找不到本地主机子域nginx wordpress的文件

Php 找不到本地主机子域nginx wordpress的文件,php,wordpress,nginx,Php,Wordpress,Nginx,在浏览器中,我得到“未找到文件”。提供了服务器日志和配置。我真的不知道现在该怎么办 错误: 2018/04/24 14:00:46[错误]28717#28717:*9发送到标准的FastCGI: “主脚本未知”从上游读取响应头时, 客户端:127.0.0.1,服务器:localhost,请求:“GET/HTTP/1.1”, 上游:“fastcgi://127.0.0.1:9000,主机:“wasob.localhost” wasob.localhost server { #Nginx s

在浏览器中,我得到“未找到文件”。提供了服务器日志和配置。我真的不知道现在该怎么办

错误:

2018/04/24 14:00:46[错误]28717#28717:*9发送到标准的FastCGI: “主脚本未知”从上游读取响应头时, 客户端: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;
  }


}

错误和配置可在

中找到,您想实现什么?文件的内部URL和您在浏览器上使用的URL是什么?愚蠢的问题,但仍然是:
/var/www/html/wasob/
中有一个index.php?URL应该是,wordpress有index.phand web根目录是/var/www/html/wasob您的
try\u files
语句中有一个输入错误-应该是
try\u files$uri$uri//index.php-缺少前导的
/
和终止的
。使用
nginx-T