I got this construct which works, but is clearly suboptimal. I tried to follow this guide, , but the configuration for php, is puzzling me. And I fear creating a security problem. I expected there to be a simple directive, similar to try_files, so it passes everything to index.php.
My version:
location / { try_files /dev/null /index.php$is_args$args;
}If index.php is in first position in try_files, it will deliver the php as download.
I also tried instead of try_files, index index.php, but then it only works when I load the toplevel domain, e.g. pretty-urls dont work then.
The example from getpagespeed.com
location / { fastcgi_param SCRIPT_FILENAME $document_root/index.php; include fastcgi_params; # override SCRIPT_NAME which was set in fastcgi_params fastcgi_param SCRIPT_NAME /index.php; fastcgi_pass unix:/var/run/php-fpm/example.com.sock;
} 4 Reset to default