Nginx - Default location directive not included in standard virtual-server creation

The server configuration file that is created for new Nginx websites should also contain the following directive:

location / { try_files $uri $uri/ /index.php?$args; }

This directive prevents many 502 bad gateway issues.



Actually, the directive should be:

try_files $uri $uri/ /index.php?$args;

Location is not necessary

Why is that directive needed though?

Actually, there is a bigger issue at work, and this directive is only a band aid.

I'll detail more including a more comprehensive solution for the problem, after the weekend!