Azure Cloud Service: two network roles using the same port

I would like to have one Azure Cloud service, including two web applications. Both applications must have the same incoming port number (80) and differ only in host headers.

Can these applications be configured as different web roles ? As I can see, it is not possible to specify the same port as the endpoint of different roles.

+6
source share
1 answer

No, It is Immpossible. You have 2 options:

  • Deploy everything to a single web role. This allows you to use host headers on the same port. If you think performance might be a problem, just add more instances.

  • If for some reason you cannot host both web applications in the same web role, consider using multiple cloud services:

    • myapp1.cloudapp.net β†’ with host header: customers.myapp.com
      • WebRoleA with input endpoint Http port 80
    • myapp2.cloudapp.net β†’ with host header: admin.myapp.com
      • WebRoleB with input endpoint Http port 80
+10
source

All Articles