May not be the problem, but check this post:
https://serverfault.com/questions/1127094/why-is-request-argument-not-returned-in-response
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I am hosting website on DigitalOcean and use Nginx engine for Laravel. And I have issue that SOMETIMES while browsing my website I get white page with text 400 Bad Request nginx/1.18.0 (Ubuntu). After I reload page all is good, then I can browse for few minutes and I get this error again.
While browsing Nginx logs I found that while browsing web sometimes request is missing half of its content. Here is example:
Here missing letter in first word
77.66.888.247 - - [02/Nov/2023:16:57:06 +0000] "pplication/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7" 400 166 "-" "-"
Missing http request section and path
77.66.888.247 - - [02/Nov/2023:17:37:00 +0000] "NWsUVnA==" 400 166 "-" "-"
Also missing http section:
77.66.888.247 - - [02/Nov/2023:17:23:40 +0000] "/domain.com/catalogue" 400 166 "-" "-"
I get this error in different places, it is not limited to single controller. I don't get this error in local environment. I suspect issue is with PHP or Nginx settings in server. My Nginx.conf comply to example here: https://laravel.com/docs/10.x/deployment
FIXED. I couldn't find root cause of the issue, but after enabling HTTPS and making redirect to HTTPS whenever user tries to enter HTTP, I no longer get these weird errors - FIXED I used certbot tool to get HTTPS up and running
Please or to participate in this conversation.