Running Two Services on Port 80 – How to Configure

apache-2.2maven

I need to run Apache and Maven on my server, and because of cross-domain security restrictions they must both be running on port 80. Originally I achieved this using HAProxy, but this got in the way of the other websites I host on my VPS. I do have four IPs, however, and it would be very nice to have Apache running port 80 on one IP and Maven running port 80 on another. Then I could easily route a few subdomains to Maven using a CNAME record. Is this possible to do?

Best Answer

Absolutely, you can bind two services to the same port on different IPs.

Just set up Apache and Maven to bind to a specific IP address.

Related Topic