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: /Users/USERNAME/.indigo/stacks/system-stack/nginx_reverse_proxy/conf/sites-enabled/rp.local.drupal10.test.conf
under 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:
Creating a ~/.valet/Nginx/all.conf
file and include:
proxy_buffer_size 1024k;
proxy_buffers 4 1024k;
proxy_busy_buffers_size 1024k;
And appending this to /usr/local/etc/nginx/fastcgi_params
:
fastcgi_buffer_size 1024k;
fastcgi_buffers 4 1024k;
fastcgi_busy_buffers_size 1024k;
But, this may be different because Valet uses Nginx in place of Apache.