I have a Laravel 4 and a Laravel 5 project running on Homestead with Vagrant on my local machine. I was able to get them both working, but when I tried to add packages, I had to update php. I updated the php on my machine, and now when I type php -v in the shell, it is: PHP 5.6.9.
Now when I vagrant up and navigate to my projects, the Laravel 4 project is working fine, but for the Laravel 5 project, I am getting:
502 Bad Gateway
nginx/1.6.1
This was working just fine before this upgrade/change.
Is there anything I need to change or do to fix this? Thank you!
ssh to homestead and do sudo ls /etc/nginx/sites-enable/ then you should have several config files, open the one related to L5 and check the error_log location.
After that open the error_log and check the last lines of that file.
So I got into sites-enabled on the path you showed. However, I'm not seeing several config files. I am seeing the proxy names of the two sites I have (thislaravel4site.dev and thislaravel5site.dev). I can't cd into either.
When I use the vi command to open thislaravel5site.dev, I get:
So do sudo nano /var/log/nginx/thislaravel5site.dev-error.log or sudo tail -f /var/log/nginx/thislaravel5site.dev-error.log -n150 and check for the last lines.
you need to add sudo at beginning due filesystem permissions.
Hmm, so it seems that when I use the default "welcome" view that comes with a fresh install of Laravel 5 it works fine. But when I try to use my route (landing.blade.php), it gives me the bad gateway. My route is using HTML, but I added HTML in the composer.json and the providers/aliases arrays. Not sure why it wouldn't be working