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

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 have a server behind the corporate firewall with only port 80 open. Is there any way to run Apache and Node.js separately on the same domain, but different urls? For example, can I run Apache on and Node on

share|improve this question
up vote 4 down vote accepted

You can. You have 3 possible setups:

  • node listens at port 80 and redirects certain requests to Apache listening at port 8000
  • Apache listens at port 80 and redirects certain requests to node listening at port 8000
  • A separate reverse proxy (Nginx, HAProxy or another one) redirects requests to either Apache listening on port 8001 or Node listening on port 8002.

Given that Apache is your corporate server, the second way is the safest. Read the documentation on Apache mod_proxy module on how to do so. You can have either a separate "folder" for Node (e.g. all requests to are served by node while all other requests are served by Apache, or you can have a separate virtual host for Node.

share|improve this answer
ProxyPass works as charm! Thank you! – tambourine Sep 15 '11 at 14:28

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.