# Nginx not listening on 80

**URL:** <https://www.ruby-forum.com/t/nginx-not-listening-on-80/114934>\
**Category:** Deployment\
**Created:** [September 18, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/nginx-not-listening-on-80/114934 "2007-09-18T23:01:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bakki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6a8cbe/32.png) [@bakki](https://www.ruby-forum.com/u/bakki)\
**Post date:** [September 18, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/nginx-not-listening-on-80/114934/1 "2007-09-18T23:01:59Z")

</div>

I compiled nginx on Debian Etch with:  
./configure   
–sbin-path=/usr/local/sbin/nginx   
–conf-path=/etc/nginx/nginx.conf   
–pid-path=/var/run/nginx/nginx.pid   
–error-log-path=/var/log/nginx/error.log   
–http-log-path=/var/log/nginx/access.log   
–with-http\_ssl\_module   
–with-openssl=/usr/lib   
–with-sha1=/usr/lib

I am using nginx.conf as follows:

#user nobody;  
worker\_processes 1;

#error\_log logs/error.log;  
#error\_log logs/error.log notice;  
#error\_log logs/error.log info;

#pid logs/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
include /etc/nginx/mime.types;  
default\_type application/octet-stream;

```
#log_format main '$remote_addr - $remote_user [$time_local]

```

$request ’  
# '"$status" $body\_bytes\_sent “$http\_referer” ’  
# ‘"$http\_user\_agent" “$http\_x\_forwarded\_for”’;

```
#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
    listen myIP:80;
    server_name mydomain.net;

    #charset koi8-r;

    # doc root
    root /var/www/apache2-default;

    #access_log logs/host.access.log main;

    location / {
        root /var/www/apache2-default;
        index index.html index.htm;
    }

    #error_page 404 /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /var/www/apache2-default;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    # proxy_pass http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on

```

127.0.0.1:9000  
#  
#location ~ .php$ {  
# fastcgi\_pass 127.0.0.1:9000;  
# fastcgi\_index index.php;  
: # fastcgi\_param SCRIPT\_FILENAME /scripts  
$fastcgi\_script\_name;  
# include conf/fastcgi\_params;  
#}

```
    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    # deny all;
    #}
}

# another virtual host using mix of IP-, name-, and port-based

```

configuration  
#  
#server {  
# listen 8000;  
# listen somename:8080;  
# server\_name somename alias another.alias;

```
# location / {
# root html;
# index index.html index.htm;
# }
#}

# HTTPS server
#
#server {
# listen 443;
# server_name localhost;

# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_timeout 5m;

# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:

```

+SSLv2:+EXP;  
# ssl\_prefer\_server\_ciphers on;

```
# location / {
# root html;
# index index.html index.htm;
# }
#}

```

}

When I use lynx locally on the server I get a response and see the  
entry in the access.log. But when I go in from a remote browser using  
IP I don’t get a response and no entry in error.log or access.log. Am  
I missing something in the nginx.conf? I just minimally modified the  
default conf file

Thank you,

bakki

---

<div class="post-metadata">

**Author:** ![bakki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6a8cbe/32.png) [@bakki](https://www.ruby-forum.com/u/bakki)\
**Post date:** [September 18, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/nginx-not-listening-on-80/114934/2 "2007-09-18T23:08:00Z")

</div>

On 9/18/07, bakki [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –with-openssl=/usr/lib \
> 
> ```
> default_type application/octet-stream;
> 
> #error_page 404 /404.html;
> #location ~ \.php$ {
> 
> ```
> 
> $fastcgi\_script\_name;
> 
> ```
> # root html;
> 
> ```
> 
> IP I don’t get a response and no entry in error.log or access.log. Am  
> I missing something in the nginx.conf? I just minimally modified the  
> default conf file
> 
> Thank you,
> 
> bakki
> 
> >

Sounds like a firewall problem or a routing problem. Are you sure port  
80 is  
open to the world and is, if necessary, port forwarded to the server?

Jason

---

<div class="post-metadata">

**Author:** ![bakki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6a8cbe/32.png) [@bakki](https://www.ruby-forum.com/u/bakki)\
**Post date:** [September 19, 2007, 12:53am UTC](https://www.ruby-forum.com/t/nginx-not-listening-on-80/114934/3 "2007-09-19T00:53:11Z")

</div>

Duh! That’s it Jason. Thank you for waking me up.

-bakki
