I'm having a similar issue with Drupal projects. I typically disable all cache and aggregation which causes a 502 Bad Gateway error that I believe is coming from
nginx_reverse_proxy along with “upstream sent too big header while reading response header from upstream” message.
My stack is Apache/PHP/MySQL
I was able to bypass the nginx_reverse_proxy and load the site successfully by using the port number found here:
proxy_pass. e.g. https://local.drupal.test:50011
The docs provide a way to override
nginx_reverse_proxy noted under Advanced Service Configuration with a
custom.conf file, but I'm not having any success.
With Laravel Valet, I was able to fix the 502 error by doing the following:
~/.valet/Nginx/all.conf file and include:
proxy_buffers 4 1024k;
And appending this to
fastcgi_buffers 4 1024k;
But, this may be different because Valet uses Nginx in place of Apache.