I am trying to install an Nginx server with PHP and MySQL on my VPS running CentOS.
I followed this tutorial to install all the sofware.
he server is running, the virtual hosts are working, but when I try to connect to MySQL in a PHP file the server returns 502 Bad Gateway.
I am a newbie in Linus, so I don't exactly know where to find all the logs etc.
I have found this error in the virtual host log, but I don't know what it means.
2012/04/15 23:07:33 [error] 22360#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 184.108.40.206, server: @host, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "@host"
(where @host is my server)