0

First of all I found a few questions on here that are similar but are either unanswered on different enough not to be helpful to me.

I have an Azure server with an endpoint of 80 to 1112 on the server. In IIS I have a web page with a binding on port 1112. This page displays fine when I go to example.com

The problem is that I have a java webserver running on port 1113. What I need is any request sent to example.com/services should be 'forwarded' to port 1113. Please keep in mind that going to example.com:1113 is not possible as there is no endpoint set in azure. Unfortunately I am not able to change any of the endpoints in azure.

How do I reverse proxy example.com/services to port 1113 internally?

Fennek
  • 1

2 Answers2

0

According to your description, maybe we can try to edit the configuration to forward the port to 1113. Your Azure server with an endpoint of 80 to 1112 on the server, the server seems like in classic mode.

If your server in classic mode, we can try to edit the endpoint configuration to forward the port. We can edit the endpoint with the old portal(classic); If your server in resource mode, we can try to configure the NSG to forward the port to 1113. Also we can use the new portal to configure the NSG(Network security group).

Add or edit endpoint and how to configure NSG

If you still have questions, welcome to post back here. Thanks.

Jason Ye
  • 2,399
  • 1
  • 8
  • 10
  • The problem is that I need to access port 1112 on the server through endpoint 80. so http://someurl.com/ should display port 1112 on the server (iis). when I go to http://someurl.com/services/ I should get 1113 on the server (java webserver) – Fennek Sep 30 '16 at 11:28
0

You can use HTTP redirect to redirect the URL to "http://example.com:1113/". But you need to create a new endpoint to open the port 1113.

If you want to only expose TCP port 1112, then you may need to install a proxy server. Here is a good article about how to publish a web site with TMG server.

  • This is indeed an option but we want it differently. We want to access http://example.com:1113/ internally on the server by typing http://example.com/services/ on the client. Redirect is not an option because port 1113 is not open to public. It's only used internally on the server. So to be clear, port 80 /services should return data of the internal port 1113. Is this possible? – Fennek Oct 06 '16 at 14:42
  • @Fennek As I have mentioned above, you need a proxy server to achieve that if you only want to expose 1112 (mapped to 80 in your case). You need to map port 80 to the proxy server, then create 2 rules on the proxy server. One for 1112 and the other for 1113. When request from client arrives Azure, it will be forwarded to the proxy server. Then the proxy server will relay the request to the suitable destination according to the configured rules. – Steven Lee - MSFT Oct 07 '16 at 02:09
  • Alright, I will check it out and get back to you. Thank you – Fennek Oct 07 '16 at 08:29