Running Apache and Xojo Web at Port 80 on Single Server With 2 IPs

Hi Everyone.

My new VPS is assigned with two IP address (say IP1 and IP2).
Is there a way for me to run Apache at port 80 on IP1 and my xojo web app at port 80 on IP2?

Thanks in advance.

I know that you can configure Apache to listen to specific port and ip: https://httpd.apache.org/docs/2.4/bind.html

I don’t know if Xojo Web standalone can listen to specific ip. You can run nginx on that ip and proxy the request to Xojo web on another port.

https://documentation.xojo.com/topics/application_deployment/web/deployment_details.html

Look at the NetworkInterfaceIndex option on running your web app standalone. That should allow you to set what network interface your webapp is listening on

–NetworkInterfaceIndex The index value (of NetworkInterfaces) to use as the NIC for connections. You can also use the value “Loopback” to allow listening only on the loopback interface.