Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
Laravel on Cloudflare produces 502 Bad Gateway on form errors

On my Laravel app, I have a form that is validated using standard Laravel validation. If it fails, it simply redirects back to the same form and displays the errors. This is working perfectly fine on my local machine as well as on the dev site (which is hosted on the same server as production).

However, in my production site, the error produces a 502 Bad Gateway page (rendered by CloudFlare).

enter image description here

The only difference that I can find between the dev & production (or staging) sites is the environment configuration (most notably APP_ENV). I would think this might be an error to do with SSL and redirecting, but the dev environment has the same SSL settings as the staging & production, but dev shows the errors on the page as it is supposed to be, whereas staging & production shows 502. I could not find anything in the nginx or Laravel error logs. I would like some direction if anyone has dealt with this, where to look, whether it's ngnix configuration, Cloudflare configuration, SSL configuration, or Laravel configuration.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This seemed to be solved with the following put in the nginx config:

fastcgi_buffers 16 16k; 
fastcgi_buffer_size 32k;

So far no side effects, I will give it a few days to see that all functions well before confirming this as a fix.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!