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

I want to install Node.js on my box (CentOS 5) for testing and sandboxing but I can't uninstall Apache as recommend by developers using Nginx.

So what I'd like to do is have Nginx serving on IP

and Apache running (usual setup) on

and then on my windows host file do something like

and by the way how do I install Nginx on CentOS 5 yum?

share|improve this question
I don't understand the question. Just do it. Set the port of nginx to 8080 and here you go. But you can't assign a port to a DNS name. This is not possible. –  mailq Aug 25 '11 at 18:30
haha ok just install it! its not going to create some conflict when I install nginx too eh? –  qodeninja Aug 25 '11 at 18:32
No. No problem. –  mailq Aug 25 '11 at 18:34

1 Answer 1

up vote 4 down vote accepted

You can use apache proxy to port 8080 for you. Set nginx to listen on port 8080. Create a virtualhost that will respond to the name and set it up as a proxy for port 8080.

<VirtualHost *:80>
        ProxyRequests Off
        <Proxy *>
                Order deny,allow
                allow from all
        ProxyPreserveHost On
        ProxyPass /
        ProxyPassReverse /
        ProxyErrorOverride Off
        ErrorDocument 404 /notavail.html
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.