Just dropping this here in case anyone is using LEMP, specifically Laravel and NGINX, and have recently migrated their config to another server as well as a new NGINX server.
On our migration, we encountered an issue where Lumen no longer parsed our URL parameters (query params?) and frustratingly nothing seemed to work:
$request->all() -> []
$request->input('paramname') -> null
$request->has('paramname') -> false
Solution
We found our NGINX config had this line, which were one of the lines that differed from our original config:
try_files $uri $uri/ /index.php?$query_string index.html;
Changing it to magically makes everything work:
try_files $uri $uri/ /index.php?$query_string;
For some reason the extra index.html makes it not work anymore.
Cheers
Leave a Reply