Results 1 to 6 of 6

Thread: 502 Bad Gateway

  1. #1
    Join Date
    Jan 2011
    Posts
    99

    502 Bad Gateway

    Hi

    i have dedicated server with WHM/Cpanel with nginx plugin on it.
    today i add new website but for some reason i get
    502 Bad Gateway

    but when i test with html file work.

    How i can fiz that problem?

  2. #2
    Join Date
    Sep 2010
    Location
    /usr/bin/fail
    Posts
    859
    You might try and rebuild the nginx host file. Its a good chance the new domain didn't get added correctly.

  3. #3
    Join Date
    Jan 2011
    Posts
    99
    Quote Originally Posted by FLDataTeK View Post
    You might try and rebuild the nginx host file. Its a good chance the new domain didn't get added correctly.
    Thank you for your reply.
    i did that, i restart apache, restart nginx i try anything but i get this error

  4. #4
    Join Date
    Jul 2005
    Location
    here, there, where?
    Posts
    4,101
    Bad gateway usually means nginx can't connect to the proxy host set. Check the nginx configuration and see what it has for proxy_host and confirm it matches the domain and correct port apache is on.
    -Steven | Cooini, LLC
    "It is the mark of an educated mind to be able to entertain a thought without accepting it" -Aristotle

  5. #5
    Join Date
    Jan 2011
    Posts
    99
    Quote Originally Posted by steven99 View Post
    Bad gateway usually means nginx can't connect to the proxy host set. Check the nginx configuration and see what it has for proxy_host and confirm it matches the domain and correct port apache is on.
    that is weird, i mean i have already one site runing on this server.i just add new site and new one is not work. where i have to look at for seconde site?

  6. #6
    Join Date
    Jul 2005
    Location
    here, there, where?
    Posts
    4,101
    Quote Originally Posted by thiva78 View Post
    that is weird, i mean i have already one site runing on this server.i just add new site and new one is not work. where i have to look at for seconde site?
    I do not recall right off where that plug puts the config files, but check under /etc/nginx/sites-enabled and it should be a symlink back to the config file. Open that and under the location /, it should have proxy_host http://domain.com:8081/ . Also, check the error logs under /var/log/nginx/error.log (again, might be different location/filename) as it may show more info there.
    -Steven | Cooini, LLC
    "It is the mark of an educated mind to be able to entertain a thought without accepting it" -Aristotle

Similar Threads

  1. 502 Bad Gateway
    By -liquid- in forum VPS Hosting
    Replies: 3
    Last Post: 12-27-2013, 01:53 PM
  2. 502 Bad Gateway-Nginx
    By mastermovie in forum Hosting Software and Control Panels
    Replies: 9
    Last Post: 11-01-2013, 08:07 AM
  3. 502 Bad Gateway nginx/1.0.15
    By KnowledgeHub in forum VPS Hosting
    Replies: 17
    Last Post: 03-30-2013, 03:14 AM
  4. 502 Bad Gateway Error - Please Help :(
    By jani in forum Web Hosting
    Replies: 10
    Last Post: 10-11-2010, 08:42 PM
  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
  •