title: Wordpress on Sub Directory with Nginx using Proxy Pass with No Input File error
body: <p>Hope you can help but I am getting error below when trying to access the admin section of are blog.</p>
  
  <blockquote>
    <p>No input file specified.</p>
  </blockquote>
  
  <p>The actual blog is working fine but not the login/admin areas.</p>
  
  <p>As per the title the blog is on a seperate server to are main domain and were using proxy pass to forward requests to it like so.</p>
  
  <pre><code>upstream blog {
      server 111.111.111.111:443 weight=2 max_fails=3 fail_timeout=60s;
  }
  
  server{
    ...
    location /blog {
          proxy_set_header X-Real-IP  $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header Host $host;
          proxy_pass https://blog;
      }
  }
  </code></pre>
  
  <p>The nginx settings I have on the blog server is as follows.</p>
  
  <pre><code>server {
      listen 443 ssl http2;
      listen [::]:443 ssl http2;
      server_name www.domain.com;
      root /home/www.domain.com/public;
  
      add_header X-Frame-Options "SAMEORIGIN";
      add_header X-XSS-Protection "1; mode=block";
      add_header X-Content-Type-Options "nosniff";
  
      index index.html index.htm index.php;
  
      charset utf-8;
  
      location / {
          try_files $uri $uri/ /blog/index.php?$query_string;
      }
  
      error_log  /var/log/nginx/www.domain.com-error.log error;
  
      error_page 404 /index.php;
  
      location ~ \.php$ {
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
          fastcgi_index index.php;
          include fastcgi_params;
      }
  
      location ~ /\.ht {
          deny all;
      }
  
  }
  </code></pre>
  
  <p>Here are the fastcgi_params if it helps as well.</p>
  
  <pre><code>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_FILENAME     $request_filename;
  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   GATEWAY_INTERFACE   CGI/1.1;
  fastcgi_param   SERVER_SOFTWARE     nginx/$nginx_version;
  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   HTTPS           $https if_not_empty;
  fastcgi_param   REDIRECT_STATUS     200;
  fastcgi_param   HTTP_PROXY  "";
  </code></pre>
  
  <p>I understand I believe that PHP cant find the index.php file?</p>
  
  <p>Hope someone can help..</p>