Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Cloud Service: two web roles sharing the same port

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.

like image 451
alexey Avatar asked Nov 08 '12 16:11

alexey


1 Answers

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
like image 64
Sandrino Di Mattia Avatar answered Nov 08 '22 14:11

Sandrino Di Mattia