Support the ongoing development of Laravel.io →
Configuration Requests

I know I'm not the first person to encounter this, but I'm not finding an appropriate solution to this error.

It only occurs on certain pages, while the rest of the application loads fine.

What I've found is that adding the lines:

fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;

to /etc/nginx/nginx.conf within html{} seems to solve this for some people, but it's still not working for me (after restart).

One last thing I haven't been able to do yet is check the log files for nginx - when I try to go to /var/log/nginx, it tells me permission denied. :(

Any suggestions as to what's going on here?

Last updated 2 years ago.
0

I even just tried stripping the core database data transfer just to see if there's too much going on, but it still throws the error. The hell of it is that it was working totally fine all week lol

Last updated 2 years ago.
0

To view the log files, change to the root user. You should then have the correct permissions.

sudo su
Last updated 2 years ago.
0

Hello. I recently experienced 502 issues as well. Being new to the framework, I have been adding comments in my code to remind myself whats going on. After adding comments in a partial, by pushing cmd / , Sublime added html comment syntax and an additional '-->' because I had a comment already. This was breaking my code giving me the 502 Bad Gateway. @including this into a view with even more comments inside, I think was the issue. I also use the Blade comment syntax now {{-- --}} Try clearing any comments that could be breaking code. I hope this helps.

Last updated 2 years ago.
0

Thank you shabushabu! With your help I was able to see the error log and continue! <3

Last updated 2 years ago.
0

I have the same issue, I'm in root but the logs files are not helping at all... I've created a post here http://stackoverflow.com/questions/31832714/laravel-4-502-bad-gateway-with-nginx-only-in-one-view

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Meowts meowts Joined 10 Jun 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.

© 2025 Laravel.io - All rights reserved.