One idea comes to mind, copy the actual final nginx.conf and modify the rb file to copy it over. Just like it does with the other files like aliases, etc. I'm doing that right now but with a custom my.cnf file for MySQL where I tune some of the settings. I copy the final version of the file on provision and then restart the service.
homestead nginx increase fastcgi buffer and timeouts when provisioning
I've started having issues since first using L5. Many times I will get a 500, 504, or 502 error page from nginx when the problem is actually something like a typo or class not found or something where I should see the whoops error page.
I tried increasing the fastcgi buffers and timeouts as suggested here as solution 1 http://www.nginxtips.com/502-bad-gateway-using-nginx/ and it works every time.
The problem is I loose this any time I destroy and re-create the vm so I need to add this change in my homestead/scripts/homestead.rb
Anyone know how to write the following to etc/nginx/nginx.conf inside the http block at the top?
http {
##
# Custom fast_cgi to avoid 502/504
##
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
... other settings here
}
Or another way if there is an easier way to set these.
Thanks
Please or to participate in this conversation.