1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Bad Gateway - Nginx, Ubuntu 12.04 and Wordpress

Discussion in 'Nginx' started by point2, Jun 8, 2013.

  1. #1
    I am new and learning how this work.. I just finish installing 3 Wordpress Sites + Nginx + PHP 5.4 in Ubuntu 12.04 on VPS..

    My problem is it now gives me 502 Bad Gateway or sometimes i get server error 500. the WP sites only has 9 plugin and a theme.. nothing much more.. i cant find the problem..

    Also would varnish help in speeding up and not cause conflict with nginx? as i dont plan to use any cache plugin..

    Anyways, if someone can check my server then the better.. or point me to a toturial..

    I am willing to pay but not much as i dont have much.. if anyone can find the problem and config my server to work at best with WP and speed.. also give me a small tutorial or a simple instruction follow..
     
    Solved! View solution.
    point2, Jun 8, 2013 IP
  2. testu

    testu Well-Known Member

    Messages:
    231
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    130
    #2
    I sent you a PM yesterday regarding this matter.
     
    testu, Jun 9, 2013 IP
  3. point2

    point2 Active Member

    Messages:
    698
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    75
    #3
    Already found someone.. thank you..
     
    point2, Jun 9, 2013 IP
  4. #4
    Hmm I just set this up for someone yesterday, was that you? Anyway I figure I will explain what it is that causes gateway errors when you are running nginx/php and not proxy. It is because it cannot connect to the php daemon which would have been fpm for you. IN nginx.conf or sites-enabled config for the site you have to establish the way it connects to php-fpm via sock, tcp and other parameters. With control panels like ispconfig it handles this for you when you add new websites so it is a big help. Without a control panel I will usually copy a working config and edit it for the new site, a lot easier to do it in control panel though
     
    blockdos, Jun 11, 2013 IP
  5. RaviGovind

    RaviGovind Greenhorn

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #5
    Possibly you need to try Varnish which is commonly used and efficient. This would get off the load from webservers and DB.
     
    RaviGovind, Jun 13, 2013 IP
  6. point2

    point2 Active Member

    Messages:
    698
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    75
    #6
    what do you mean? use varnish with nginx? or not?
     
    point2, Jun 13, 2013 IP