6
votes

I would like to have a single Azure Cloud Service including two web applications. Both applications should have the same inbound port number (80) and differ in host headers only.

Is it possible to configure these applications as different web roles? As I see it's not possible to specify the same port as an endpoint of different roles.

1

1 Answers

10
votes

No this isn't possible. 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 an issue, simply add more instances.

  • If for some reason you can't host both web applications in a single 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