My Homestead Vagrant virtual machine is returning me a 502 Bad Gateway instead of a Laravel Whoops error for some PHP errors (like class not found, some kind of parse errors etc ...).
Does someone have the solution for briging Whoops for all PHP errors ?
I could get the error reading manually /var/log/nginx/<my_vhost>.app-error.log like this :
2014/11/27 15:15:44 [error] 1300#0: *12 FastCGI sent in stderr: "PHP message: PHP Fatal error: <ERROR HERE> on line <LINE>
But it is very annoying for debugging ...
Homestead version : 0.2.0. Laravel version : 4.2
After some searches I found a working solution.
I have to add the following lines to my
/etc/nginx/nginx.conf:Dont forget to edit with root rights with
sudoAnd then restart nginx
Source of the info : https://laracasts.com/discuss/channels/general-discussion/whoops-doesnt-show-any-errors-homestead-20