Results 1 to 18 of 18
  1. #1

    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,

  2. #2
    Check for nginx log. But for me is the php is down try to restart php

  3. #3
    I have restarted the service(service httpd restart) on main node but still same error. Please remember I am using OpenVZ server.

  4. #4
    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

  5. #5
    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 /]#

  6. #6
    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

  7. #7
    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 /]#

  8. #8
    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.

  9. #9
    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

  10. #10
    Join Date
    Apr 2011
    Location
    Cybertron
    Posts
    10,484
    Do you have a default file in your nginx setup and can you post it.

  11. #11
    Where should I get this file ?

  12. #12
    Join Date
    Apr 2011
    Location
    Cybertron
    Posts
    10,484
    etc/sites-available/

    The file should be in that folder

  13. #13
    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?

  14. #14
    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.

  15. #15
    I am using centos.Please help me as am a newbie in this field. I will post a review for you

  16. #16
    Join Date
    Mar 2003
    Location
    /root
    Posts
    23,991
    Quote Originally Posted by KnowledgeHub View Post
    I am using centos.Please help me as am a newbie in this field. I will post a review for you
    Why not contact your provider and pay them to fix it?

    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

  17. #17
    Quote Originally Posted by net View Post
    Why not contact your provider and pay them to fix it?
    This is unmanaged server and due to weekend the support is not available.

  18. #18
    Join Date
    Oct 2007
    Location
    9.9N 76.2E , Planet Earth
    Posts
    1,003
    Quote Originally Posted by KnowledgeHub View Post
    This is unmanaged server and due to weekend the support is not available.
    Send us the server login creds at info [at] piserve [dot] com and we will fix it for the review
    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

  1. Nginx 502 bad gateway
    By Ruriko in forum Hosting Security and Technology
    Replies: 10
    Last Post: 08-06-2011, 11:43 PM
  2. Nginx 502 gateway error
    By hostyourdream in forum Hosting Software and Control Panels
    Replies: 9
    Last Post: 10-12-2010, 10:20 AM
  3. I get 502 Bad Gateway Nginx and takes up 10 sec to get to my subdomain
    By chong67 in forum Hosting Security and Technology
    Replies: 24
    Last Post: 09-13-2010, 07:51 PM
  4. [HELP] nginx+PHP "502 Bad Gateway"
    By n4is3n in forum Hosting Security and Technology
    Replies: 4
    Last Post: 07-04-2010, 02:34 AM
  5. 502 - Bad Gateway Error
    By DaBoss in forum Web Hosting
    Replies: 3
    Last Post: 05-11-2003, 02:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •