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).
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.
This seemed to be solved with the following put in the
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.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?