# Cannot listen to port 80 but 3000, 3080 without Apache

**URL:** <https://www.ruby-forum.com/t/cannot-listen-to-port-80-but-3000-3080-without-apache/181049>\
**Category:** NGINX\
**Created:** [January 4, 2010, 2:19pm UTC](https://www.ruby-forum.com/t/cannot-listen-to-port-80-but-3000-3080-without-apache/181049 "2010-01-04T14:19:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![artchrst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e36b37/32.png) [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Post date:** [January 4, 2010, 2:19pm UTC](https://www.ruby-forum.com/t/cannot-listen-to-port-80-but-3000-3080-without-apache/181049/1 "2010-01-04T14:19:01Z")

</div>

Hi Guys,

I am using ubuntu and having nginx with thin (using sockets) and rails  
successfully — only on port 3000 and 3080.

When I try to change the nginx config and  
listen 80;

it fails and the follows found in nginx/error.log

2010/01/04 21:08:25 [emerg] 21146#0: bind() to 0.0.0.0:80 failed (13:  
Permission denied)

And I’ve checked what binding on port 80 but failed:

arthur@ubuntuserver:~$ sudo netstat -plant | grep ‘:80’  
[sudo] password for arthur:  
tcp 0 0 0.0.0.0:8000 0.0.0.0:\*  
LISTEN 21395/with\_thin.con  
tcp 0 0 0.0.0.0:8025 0.0.0.0:\*  
LISTEN 2999/master  
tcp6 0 0 :::8025 :::\*  
LISTEN 2999/master  
arthur@ubuntuserver:~$ lsof -i tcp:80  
arthur@ubuntuserver:~$ lsof -i tcp:8080

Can you help me?

Thanks a bunch!  
Arthur

---

<div class="post-metadata">

**Author:** ![artchrst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e36b37/32.png) [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Post date:** [January 4, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/cannot-listen-to-port-80-but-3000-3080-without-apache/181049/2 "2010-01-04T14:20:34Z")

</div>

you have to start it as root, users don’t have privs to open ports below  
1024

---

<div class="post-metadata">

**Author:** ![artchrst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e36b37/32.png) [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Post date:** [January 5, 2010, 3:20am UTC](https://www.ruby-forum.com/t/cannot-listen-to-port-80-but-3000-3080-without-apache/181049/3 "2010-01-05T03:20:38Z")

</div>

Mauro Stettler wrote:

> you have to start it as root, users don’t have privs to open ports below  
> 1024

Thanks Mauro!
