Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Completely new to Linux and virtual private servers so please bear with me.

I have a webapp built on ExpressJS and NodeJS that runs on port 5000 of my server, accessible via web by typing: When you go to my non-port IP address ( it shows the CentOS Apache setup welcome page.

I've tried running my Express app on port 80, but I get an Address In Use error.

What do I have to do to set up CentOS so that accessing its IP address at loads up my Express app? I've tried adding port 5000 to listeners in my /etc/httpd/conf/httpd.conf file but this did nothing.

share|improve this question

migrated from webmasters.stackexchange.com Dec 1 '13 at 12:02

This question came from our site for pro webmasters.

You got the Address In Use because Apache already uses port 80.

If you want to access your Express app throught port 80, then you have to shutdown Apache and run your app on port 80.

share|improve this answer

When it comes to TCP ports (which port 80 is), you can only bind one process to a given port. The process in this case is Apache, so no other process can use it while Apache is bound to the port. You can use the command netstat with the -t switch to see TCP ports in use.

$ netstat -tapn | grep :80
tcp        0      0 :::80        :::*            LISTEN      7999/httpd          

Here we can see Apache, httpd, is using the port. Also you can see the process ID (7999) for the process in the above output too.

share|improve this answer

Your Answer


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