404 error with any php file, using nginx
<p>I realize this question has been asked numerous times, yet despite all my attempts to put in place the various solutions many have suggested I have yet to solve my problem: </p>

<p>no matter what I do, any php file on my website gives me a 404 error. html files work perfectly, however.</p>

<p>my nginx.conf:</p>

<pre><code>user www-data;
worker_processes auto;
pid /run/nginx.pid;

events {
        worker_connections 768;
        # multi_accept on;
}

http {
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POOD$
        ssl_prefer_server_ciphers on;

        access_log /home/****/websites/logs/access.log;
        error_log /home/****/websites/logs/error.log;

        include v-hosts/*.conf;
        #### prevent processing requests with undefined server names
        server  {
                listen 80;
                server_name '';
                return 444;
        }


}
</code></pre>

<p>my /etc/nginx/v-hosts/website.com.conf</p>

<pre><code>server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /home/*****/websites/website.com/root;
    index index.php index.html index.htm;

    server_name website.com www.website.com;

    location / {
        try_files $uri $uri/ =404;
        root /home/****/websites/website.com/root;
        index index.php index.html index.html;
    }

    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    root /home/****/websites/website.com/root;
    }

    location ~ \.php$ {
        root /home/****/websites/website.com/root;
        try_files $uri =404;

        fastcgi_pass unix:/run/php7.0-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        }
}
</code></pre>

<ul>
<li>I have set <code>cgi.fix_pathinfo=0</code> in <em>php.ini</em> </li>
<li>I have an <em>index.php</em> as well as an <em>info.php</em> in /home/****/websites/website.com/root</li>
</ul>

<p>thank you</p>