Results 1 to 18 of 18
Thread: 502 Bad Gateway nginx/1.0.15
-
03-29-2013, 11:05 PM #1Newbie
- Join Date
- Jan 2013
- Posts
- 15
502 Bad Gateway nginx/1.0.15
Hello,
I am using openVZ VPS. All my sites were working fine, but now I am getting
502 Bad Gateway
nginx/1.0.15
error on my site. Please let me know what may be the reason and the solution for the same. Please let me know the perfect solution, don't post any link, as I have search a lot on this.
Thanks,
-
03-29-2013, 11:20 PM #2WHT Addict
- Join Date
- Jan 2008
- Posts
- 132
Check for nginx log. But for me is the php is down try to restart php
-
03-29-2013, 11:31 PM #3Newbie
- Join Date
- Jan 2013
- Posts
- 15
I have restarted the service(service httpd restart) on main node but still same error. Please remember I am using OpenVZ server.
-
03-29-2013, 11:44 PM #4Web Hosting Evangelist
- Join Date
- Feb 2012
- Location
- Europe
- Posts
- 453
httpd is not the correct service, that is Apache when your error is from nginx.
Check this file:
/etc/nginx/logs/error.log
If it doesn't exist, you can try to find it with:
Code:find /*|grep nginx|grep error
██ miscis.com - Providing domains and premium hosting solutions at an affordable price
██ cPanel+Softaculous | 99.9% Uptime SLA | CloudLinux | Daily Backups
██ Accepting PayPal, Credit/Debit Cards, Liberty Reserve
██ Currently in Netherlands, EU & Arizona, USA
-
03-29-2013, 11:50 PM #5Newbie
- Join Date
- Jan 2013
- Posts
- 15
No I did not found any error logs:
[root@abc/]# find /*|grep nginx|grep error
/home/wwwlogs/nginx_error.log
/usr/local/nginx/logs/error.log
[root@onlinereplicaoutlet /]#
-
03-30-2013, 12:02 AM #6Web Hosting Evangelist
- Join Date
- Feb 2012
- Location
- Europe
- Posts
- 453
Write this and paste here the output:
Code:tail -100 /usr/local/nginx/logs/error.log
██ miscis.com - Providing domains and premium hosting solutions at an affordable price
██ cPanel+Softaculous | 99.9% Uptime SLA | CloudLinux | Daily Backups
██ Accepting PayPal, Credit/Debit Cards, Liberty Reserve
██ Currently in Netherlands, EU & Arizona, USA
-
03-30-2013, 12:05 AM #7Newbie
- Join Date
- Jan 2013
- Posts
- 15
Hello Miscis,
Here is the result :
[root@abc /]# tail -100 /usr/local/nginx/logs/error.log
2012/12/09 20:16:34 [notice] 11901#0: signal process started
2012/12/09 20:33:57 [notice] 11949#0: signal process started
2012/12/09 20:36:44 [notice] 11974#0: signal process started
2012/12/09 20:38:17 [notice] 11997#0: signal process started
2012/12/09 20:40:13 [notice] 12020#0: signal process started
2012/12/09 20:42:00 [notice] 12047#0: signal process started
2012/12/09 20:46:34 [notice] 12074#0: signal process started
2013/03/08 14:54:58 [notice] 30921#0: signal process started
2013/03/09 01:09:28 [notice] 6276#0: signal process started
2013/03/09 13:08:10 [notice] 1936#0: signal process started
2013/03/12 10:12:06 [notice] 676#0: signal process started
2013/03/12 14:49:41 [notice] 2600#0: signal process started
2013/03/12 19:12:14 [notice] 4172#0: signal process started
2013/03/12 19:13:28 [notice] 4196#0: signal process started
2013/03/12 19:54:05 [notice] 4725#0: signal process started
2013/03/16 13:54:18 [notice] 21564#0: signal process started
2013/03/16 17:52:28 [notice] 23100#0: signal process started
2013/03/17 10:57:34 [notice] 29714#0: signal process started
2013/03/27 14:06:51 [notice] 14769#0: signal process started
2013/03/27 15:53:53 [notice] 15551#0: signal process started
2013/03/27 16:15:33 [notice] 15840#0: signal process started
2013/03/27 16:44:50 [notice] 16181#0: signal process started
2013/03/27 17:08:59 [notice] 16565#0: signal process started
2013/03/28 13:27:39 [notice] 29973#0: signal process started
2013/03/29 12:10:54 [notice] 16691#0: signal process started
2013/03/29 20:53:53 [notice] 23475#0: signal process started
[root@abc /]#
-
03-30-2013, 12:19 AM #8Web Hosting Master
- Join Date
- Apr 2011
- Location
- Cybertron
- Posts
- 10,484
Have you restarted nginx?
Are you running apache and nginx or full nginx?
Also run "netstat -plunt" and see if apache is using port 80.
-
03-30-2013, 12:27 AM #9Newbie
- Join Date
- Jan 2013
- Posts
- 15
Yes I restart the nginx service. Here is the result of netstat -plunt :
[root@abc /]# netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 665/sendmail: accep
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 646/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 506/nginx.conf
tcp 0 0 :::22 :::* LISTEN 522/sshd
-
03-30-2013, 12:58 AM #10Web Hosting Master
- Join Date
- Apr 2011
- Location
- Cybertron
- Posts
- 10,484
Do you have a default file in your nginx setup and can you post it.
-
03-30-2013, 01:03 AM #11Newbie
- Join Date
- Jan 2013
- Posts
- 15
Where should I get this file ?
-
03-30-2013, 01:04 AM #12Web Hosting Master
- Join Date
- Apr 2011
- Location
- Cybertron
- Posts
- 10,484
etc/sites-available/
The file should be in that folder
-
03-30-2013, 01:13 AM #13Newbie
- Join Date
- Jan 2013
- Posts
- 15
after entering /etc I found a directory named as Default in that I found two files :
[root@abc default]# ll
total 8
-rw-r--r-- 1 root root 1756 Aug 27 2012 nss
-rw------- 1 root root 119 Mar 31 2010 useradd
Is it this files?
-
03-30-2013, 01:21 AM #14Web Hosting Master
- Join Date
- Apr 2011
- Location
- Cybertron
- Posts
- 10,484
Hmm, I've hit a road block and hopefully someone can jump in on this.
Also to help anyone else looking into this, what Linux are you using (centos, debian, ubuntu,)? Each one has slight variation when it comes to configurations.
-
03-30-2013, 01:58 AM #15Newbie
- Join Date
- Jan 2013
- Posts
- 15
I am using centos.Please help me as am a newbie in this field. I will post a review for you
-
03-30-2013, 02:15 AM #16The Linux Specialist
- Join Date
- Mar 2003
- Location
- /root
- Posts
- 23,991
Specially 4 U
Reseller Hosting: Boost Your Websites | Fully Managed KVM VPS: 3.20 - 5.00 Ghz, Pure Dedicated Power
JoneSolutions.Com is on the net 24/7 providing stable and reliable web hosting solutions, server management and services since 2001
Debian|Ubuntu|cPanel|DirectAdmin|Enhance|Webuzo|Acronis|Estela|BitNinja|Nginx
-
03-30-2013, 02:22 AM #17Newbie
- Join Date
- Jan 2013
- Posts
- 15
-
03-30-2013, 03:14 AM #18Web Hosting Master
- Join Date
- Oct 2007
- Location
- 9.9N 76.2E , Planet Earth
- Posts
- 1,003
∞A U T O M 8 N . C O M
High Available webstack for cPanel
Active-Active redundancy and High Availability plugin for cPanel
Similar Threads
-
Nginx 502 bad gateway
By Ruriko in forum Hosting Security and TechnologyReplies: 10Last Post: 08-06-2011, 11:43 PM -
Nginx 502 gateway error
By hostyourdream in forum Hosting Software and Control PanelsReplies: 9Last Post: 10-12-2010, 10:20 AM -
I get 502 Bad Gateway Nginx and takes up 10 sec to get to my subdomain
By chong67 in forum Hosting Security and TechnologyReplies: 24Last Post: 09-13-2010, 07:51 PM -
[HELP] nginx+PHP "502 Bad Gateway"
By n4is3n in forum Hosting Security and TechnologyReplies: 4Last Post: 07-04-2010, 02:34 AM -
502 - Bad Gateway Error
By DaBoss in forum Web HostingReplies: 3Last Post: 05-11-2003, 02:10 AM