Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've followed this tutorial for a basic installation of nginx.

I always get bad gateway errors and when i look at the logs i see :

[error] 3226#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client

Here is my nginx.conf and contents of my sites-available/defaults

nginx.conf, defaults

I am also seeing this error :

conflicting server name "" on, ignored

I am using Ubuntu 12.04, PHP5-FPM

Thank you!

share|improve this question
Is php5-fpm actually running and listening to on port 9000? – Ladadadada Dec 13 '12 at 23:59
How do i know that? Sorry Im very much new to PHP-FPM /Nginx combo – r2b2 Dec 14 '12 at 7:55
The command sudo netstat -tlnp | egrep "php5-fpm|9000" displays any running process called php5-fpm or listening on port 9000. – Ladadadada Dec 14 '12 at 10:12

Check if php-fpm is really running with e.g. ps aux | grep php. You can start and stop php-fpm with /etc/init.d/php-fpm start|stop|restart.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.