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 installed nginx on debian and then tested it with wget localhost and wget to see if it responds to simple requests. After this i changed the default root folder to /var/www and tried testing again.
Now if i try wget locahost it works, but wget gets "connection refussed". I'm thinking it's a permissions problem, but I can't find a long anywhere that would tell me anything about this. I tried searching through all the files inside /var/log and /var/log/nginx but there is nothing there.
Is there another place where the system logs failed connection attempts? And if not, does anyone know a way I could find the reason for this problem?

--2012-08-16 05:59:38--  
Connecting to failed: Connection refused.

nginx configuration:

server {  
   server_name testing;  
   root /var/www;  
   index index.php index.html index.htm;  

   location / {

share|improve this question
Can you provide your configuration? And maybe netstat -ln for good measure? – Shane Madden Aug 16 '12 at 3:54
1. Show use exactly output you get when running wget 2. As @ShaneMadden said, post your Nginx configuration? – quanta Aug 16 '12 at 3:55
@ShaneMadden the nginx configuration? and I will add the netstat output. – nope Aug 16 '12 at 3:56
up vote 2 down vote accepted

Means that Nginx is only listening on Look at the output of netstat --inet -nlp | grep :80, you will see something like this:

tcp        0      0  *               LISTEN      11789/nginx.conf

To make the server accessible via the LAN address (, add a listen directive:


then restart Nginx and try again.

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.