Support the ongoing development of Laravel.io →
posted 10 years ago
Configuration
Last updated 2 years ago.
0

If you upgraded to PHP 5.5.12 then open up /etc/php5/fpm/pool.d/www.conf and uncomment the following listen directives:

listen.owner = www-data
listen.group = www-data
listen.mode = 0660

Run this afterwards:

sudo service php5-fpm restart
Last updated 2 years ago.
0

Okay, tried this, but it does not work as expected. :(


If anybody else has the same error, try to add this before the Fixing permissions part of the bootstrap.sh file.

echo " --- Fixing 502 Bad Gateway --- "
sed -i 's/;listen.owner = www-data/listen.owner = vagrant/g' /etc/php5/fpm/pool.d/www.conf
sed -i 's/;listen.group = www-data/listen.group = vagrant/g' /etc/php5/fpm/pool.d/www.conf
sed -i 's/;listen.mode = 0660/listen.mode = 0660/g' /etc/php5/fpm/pool.d/www.conf
Last updated 2 years ago.
0

Well, worked for me for all our production sites and my local vagrant server. We're using Nginx 1.6 and Ubuntu 14.04, though, so might make a difference.

Last updated 2 years ago.
0

Okay, I will check it again. We are using nginx 1.2.1 and Debian Wheezy if I remember correctly.

Thanks!


Update:

I updated to 1.6, but it didn't work. This will:

Just change php5-fpm.sock's owner from root/vagrant to www-data like below...

chown www-data:www-data /var/run/php5-fpm.sock
Last updated 2 years ago.
0

@shabushabu thanks a lot! I was having the same issue and this solved it perfectly.

Last updated 2 years ago.
0

I also found that comments were breaking my code causing 502 errors. I was accidentally breaking comments with @includes, by mixing comments.

Last updated 2 years ago.
0

I met the same issue. I found a solution to ignore the error.

Adding two lines to Nginx configuration file /etc/nginx/nginx.conf :

http {
...
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
...
}
Last updated 2 years ago.
0

i just got the same error as the thread owner, the fix i did was to open my virtualbox app (mac) and just REMOVE it and clear it all, and then just did a vagrant up and now it works again

and if you are using laravel its easy to migrate your database again

Last updated 2 years ago.
0

I agree with SimonJ. Delete the lot and start again. It was quick, easy and fixed the problem. I wish I'd read this thread earlier instead of trying to "fix" the problem and getting nowhere.

What I did was..... Upgrade to latest VirtualBox (4.3.16 for me) Select your virtual Machine from the list "VirtualBox/Machine/Close/Power Off", then "VirtualBox/Machine/Remove [+"Delete All files" option]" then "Close VirtualBox"

From the Terminal..... CD to your Homestead folder (for me "cd WWWBOX/VirtualBoxVM/homestead") then "Vagrant up"

Thats all there is to it. Just let Vagrant rebuild the virtual machine and you are good to go.

This will not affect any of your "Settings" as these are all contained in your Homestead.yaml file. Everything that worked before will spring into life again.

Good luck

Last updated 2 years ago.
0

@SimonJ, thank you for the recommendation to re-instantiate the Virtual Machine (and @ghkdev for the steps). This solved the issue for me, and saved me time from having to 'solve' the problem.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

balintant balintant Joined 2 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.