That is the fastcgi section.
Feb 21, 2023
4
Level 1
Nginx deployment clarification - security
Regarding nginx deployment outlined in documentation (/docs/10.x/deployment#nginx), what is the particular benefit of this directive?
location ~ \.php$ {
Since Laravel only contains index.php in the public directory, is it safe to replace this directive with the following one?
location = /index.php {
The latter would only allow executing index.php as PHP code, this could increase security if, for example, an attacker would be able to drop any other PHP file in your public directory tree using any means.
What are your opinions on this? Thank you a lot in advance.
Please or to participate in this conversation.