Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a server at So I created a conf file for the default server (default.conf)

server {
    listen       80;
    server_name default;

    location / {
        root   /var/www/html;
        index  index.php index.html;

Full config. But I am not able to get even a single index.html to work. No response from server. The access log is empty, which I assume means, nginx is not listening to request at all. I have doubled checked the path and files.

I don't realize what is the problem here.

Update: Output of,

netstat -plutn

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0    *               LISTEN      590/sshd
tcp        0      0  *               LISTEN      855/sendmail: accep
tcp        0      0*               LISTEN      1991/php-fpm: maste
tcp        0      0  *               LISTEN      756/mysqld
tcp        0      0    *               LISTEN      3031/nginx: master
tcp        0      0 *               LISTEN      759/perl
tcp6       0      0 :::22                   :::*                    LISTEN      590/sshd
udp        0      0 *                           759/perl

Update 2: After suggestion of @jamzed, I checked my iptables and realized that port 80 was not open. Added a rule for opening port, rebooted my system and it worked like a charm. Hope it helps!

share|improve this question
You can not access your website or any else error?Please post your error here – cuonglm May 18 '13 at 19:04
@Gonuc: Absolutely nothing at all, Server takes too long to respond on my FF. Try – Shubham May 18 '13 at 19:06

2 Answers 2

up vote 1 down vote accepted

Try connect from localhost to localhost:

$ printf "GET / HTTP/1.0\r\n\r\n" | nc 80


$ telnet 80

Did you check firewall rules for port 80? also you can use tcpdump and check if the packets come to your webserver.

share|improve this answer
The printf command does give the right output. Does that indicate problem with Firewall? tcpdump gave a very verbose, never-ending, output – Shubham May 18 '13 at 19:42

Problem maybe fastcgi_pass;. Try change it to fastcgi_pass;

Check your firewall rule, it can block traffic to

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.