How do I get nodejs to run without a port number on a Apache server How do I get nodejs to run without a port number on a Apache server codeigniter codeigniter

How do I get nodejs to run without a port number on a Apache server


Assuming you intend to differentiate requests looking for the nodejs app from requests seeking the codigniter app by seeing /api as the root path, try:

ProxyPass /api http://localhost:8010/apiProxyPassReverse /api http://localhost:8010/api

See ProxyPass and ProxyPassReverse for more magic.


Disclaimer: I have no experience with codeigniter, so this may be non relevant, or false.

Your node.js server listen to port 8010, which is non standard, that is why you need to indicate it in the URL.

You seems to imply codeigniter is already listening to the standard port (80).The way I see, with no knowledge of codeigniter, to go around the issue would be to either host all the node.js url in codeigniter, and redirect them to port 8010:

Client call /node on port 80CodeIgniter call /node on himself at port 8010Node get the request and answerCode igniter gove the answer to the client

Or the reverse, which would be to host any codeigniter URL in node.js, and redirect them to whatever port codeigniter will listen.

Or you will need to configure Apache to redirect the request to port whatever codeigniter on or 8010 depending of the url.