Question
How to install Laravel 5 on Ubuntu/Nginx server
Hi,
I have been trying to get Laravel 5 installed in my Ubuntu/Nginx server but not luck. I followed this tutorial but I keep getting the following error “502 Bad Gateway nginx/1.4.6 (Ubuntu)”.
Any idea what could be happening here? Have any one see this error after following this tutorial tutorial?
Is there any other tutorial that I could follow to install Laravel 5?
Thanks
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Seams that something is wrong with the php-fpm service.
Check your nginx and php-fpm logs.
This article should help you more.
Thank you for your reply.
Here is what I get when I run
sudo tail -f /var/log/php*
[27-May-2015 07:38:19] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
And here is what I get when I run
sudo tail -f /var/log/nginx/*
tail: cannot open ‘/var/log/nginx/*’ for reading: No such file or director
This is what I see when I open
sudo vi /var/log/nginx/
Check if php5fpm process exist :
sudo ps aux | grep php5
Would it possible to paste your nginx config here. you can replace domain and sensitive info first
This is what I got when I typed sudo ps aux | grep php5
I hope non of this info compromises my server.
Thanks
Any suggestion? I don’t want to give up that easy.
Here is what I got running
sudo vi /var/log/nginx/error.log
2015/05/28 15:12:01 [crit] 13205#0: *72 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 888.888.888.88, server: mydomain.com, request: “GET / HTTP/1.1”, upstream: “ fastcgi://unix:/var/run/php5-fpm.sock:”, host: “mydomain.com”
Thanks
I ran into a similar issue that was solved by fixing my permissions and nginx.conf file.
This guide helped me alot: http://laravel-recipes.com/recipes/26/creating-a-nginx-virtualhost