title: File not found nginx php-fpm
body: <p>I've looked through every question like this here and tried to apply the stated fixes with no success.</p>
  
  <p>I'm using the <code>wordpress:4.7.3-php7.0-fpm-alpine</code> docker image with a separate nginx container in front of it.</p>
  
  <p>When I curl wordpress I get:</p>
  
  <pre><code>File not found.
  </code></pre>
  
  <p>When I check the wordpress container logs, I get:</p>
  
  <pre><code>127.0.0.1 -  16/Mar/2017:06:26:24 +0000 "GET /index.php" 404
  127.0.0.1 -  16/Mar/2017:06:31:27 +0000 "GET /index.php" 404
  127.0.0.1 -  16/Mar/2017:06:32:16 +0000 "GET /index.php" 404
  127.0.0.1 -  16/Mar/2017:06:37:17 +0000 "GET /index.php" 404
  127.0.0.1 -  16/Mar/2017:06:39:09 +0000 "GET /index.php" 404
  </code></pre>
  
  <p>The actual nginx error is:</p>
  
  <pre><code>2017/03/16 06:26:24 [error] 17#17: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 10.128.0.7, server: k8wp, request
  : "GET / HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000"
  </code></pre>
  
  <p>I'm using php 7</p>
  
  <pre><code>/var/www/html # php-fpm -v
  PHP 7.0.16 (fpm-fcgi) (built: Mar  3 2017 23:07:56)
  Copyright (c) 1997-2017 The PHP Group
  Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
      with Zend OPcache v7.0.16, Copyright (c) 1999-2017, by Zend Technologies
  </code></pre>
  
  <p>My nginx config is</p>
  
  <pre><code>server {
      root /app;
  
      # Add index.php to the list if you are using PHP
      index index.php index.html index.htm index.nginx-debian.html;
  
      server_name _localhost;
  
      location / {
          # First attempt to serve request as file, then
          # as directory, then fall back to displaying a 404.
          try_files $uri $uri/ =404;
      }
  
      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
      #
      location ~ \.php$ {
              try_files $uri =404;
              fastcgi_pass    127.0.0.1:9000;
              fastcgi_index   index.php;
              fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;
              include         fastcgi_params;
      }
  }
  </code></pre>
  
  <p>I'm running nginx as the user <code>www-data</code>:</p>
  
  <pre><code>user www-data;
  </code></pre>
  
  <p>According to <code>/usr/local/etc/php-fpm.d/www.conf</code> the user and group are uncommented and set to <code>www-data</code></p>