Single Domain Name for Multiple App Services

_Julien Jalageas.AZ 21 Reputation points
2022-12-15T22:56:32.957+00:00

Hi,

We are in the process of moving multiple tomcat webapps to Azure App Services. Each webapp is currently in its own Linux App Service, all in the same App Service Plan. There is a requirement for these applications to share a cookie which is only possible if the domain name is the same across all App Services.

Is there a way (without using virtual directories) that when the user types in the address bar "example.com/site1" the user is redirected to "site1.azurewebsites.net", but the address bar would still show "example.com/site1"?

I have tried using the Azure Gateway but was unsuccessful in my effort. It would also work if "site1.azurewebsites.net/site2" could correctly load "site2.azurewebsites.net". The main goal being to be able to share cookies between App Services.

We also thought of using custom domains with a common subdomain for all App Services, however we have 30+ apps that need to be migrated and we would prefer not buying a custom domain for each app.

Please advise of the best way to achieve this. Much appreciated.

Thanks,
Julien

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
237 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,079 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,902 questions
0 comments No comments
{count} votes

Accepted answer
  1. Maatoug wassim 76 Reputation points
    2022-12-16T09:17:10.677+00:00

    Hi @_Julien Jalageas.AZ ,

    Not sure if this would help, I do understand that you need a Path-based URL redirection.
    Azure Application Gateway may help you acheive this. Please have a look at the follwoing article : create-url-route-portal

    271334-scenario.png

    In the article, the use case is different backend ( root, image, video) for same app but you can look at it as different applications like : site1, site2, .. , siteN

    Hope this would help


1 additional answer

Sort by: Most helpful
  1. _Julien Jalageas.AZ 21 Reputation points
    2022-12-20T15:22:29.31+00:00

    @Maatoug wassim This video follows the microsoft tutorial which for VMs. I have not found any tutorial for app services. Nevertheless, I started from scratch and followed the video, and was able to make it work by changing one setting:

    Within the app services, in TLS/SSL settings, I switched "HTTPS only" to off, cleared my browser cache and cookies, gave it one more try, and it loaded my app services with the public IP in the address bar.

    Thanks for taking the time to find those tutorials, I greatly appreciate it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.