root __FINALPATH__/; index index.php; try_files $uri $uri/ /index.php?$args; # Force usage of https if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; }