On my current project we are working on two applications for a customer, one is in .NET and the other is in Java. The client only wants to have port 80 and 443 open on the server, however, we will need to have two web servers running, IIS for the .NET application and Jetty for the Java application. Our solution was to run the .NET application on IIS on port 80 and the Java application on Jetty on port 81, then have IIS route traffic for the Java application coming in on port 80 to port 81 using IIS as a proxy to Jetty. The following is a simple tutorial on how to setup IIS as a proxy to Jetty.
Install Application Request Routing (ARR)
Setup IIS to Jetty Redirect
For this example the route for the Jetty application will be “fddapi”.
Open IIS and on the Server select “Application Request Routing” icon.
Select “Server Proxy Settings”.
Set “Enable Proxy” setting and “Apply” the change.
Go to “Default Web Site”, select “URL Rewrite”.
Under the Actions menu select “Add Rules”.
Under “Inbound Rules” select “Blank Rule” and click “Ok”.
Edit the Inbound Rule with a pattern to match on and how to rewrite the url.
Test the Setup
Now open a browser and go to the url: http://localhost/fddapi/someroute which should work now without needing to specify port 8081.