Block PHP Files Nginx
Ok found the answer. You need to put this directive above the location: location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.0-fpm.sock; } The order apparently matters inside the nging conf file.