question

AdrianN-4768 avatar image
0 Votes"
AdrianN-4768 asked ajkuma-MSFT commented

Publish Apps under different subdomains.

Hi All

Just wondering if this is possible. I want to publish different web apps under a different subdomain. For example:

www.mybusiness.com (My Website)

For web apps I make, I would like them to be directly published to a subdomain. So it will look like:

myapp1.mybusiness.com (commerce app)
myapp2.mybusiness.com (booking app)
myapp3.mybusiness.com (sales app)


I usually just select the publish option under VS and set up the details within the setup wizard. What steps can I take in order to set up my domain and subdomains properly so azure treats the subdomains as a separate directory for me to directly upload my app files into it. Thanks in advanced!

azure-webappsdotnet-aspnet-core-generaldotnet-aspnet-core-mvc
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Could you please tell me which target Azure service you want to publish to? Azure web app? Azure VM IIS or else?

0 Votes 0 ·

@BrandoZhang-MSFT

I'm using App Services to publish my web applications.

0 Votes 0 ·

Do you mean you have multiple applications inside one solution and you want to publish different application to different subdomian Azure web apps?

0 Votes 0 ·
Show more comments

Setting the domain or sub domain name is just a setup step of creating an azure app.

app-service-web-tutorial-custom-domain


0 Votes 0 ·

@BruceBarker-8516

I can set those up, however, I'm unsure if I'm able to publish apps into different sub-domains using the Publish Section within VS. From what I have been doing, I publish an app service with portal.azure and when I go through the Publish wizard in VS, I select the app service I created. From there I don't see an option to publish to a subdomain.

0 Votes 0 ·

1 Answer

ajkuma-MSFT avatar image
0 Votes"
ajkuma-MSFT answered ajkuma-MSFT commented

@AdrianN-4768, Apologies for the delayed response here.

1/2:

You can have multiple sites as sub-directories. Something like, site/app1, site/app2, site/app3.

Please see Virtual applications and directories

You can change the 'Type' to 'Application' in the Path mappings for /folder.

On the Publish dialog, you need to choose the appropriate virtual App. Then you need to include the virtual directory path in the “`Site Name`” and “`Destination URL`” sections on the Connection tab.

Please see this old blog on deploying multiple virtual directories to a single Azure Website
https://docs.microsoft.com/archive/blogs/tomholl/deploying-multiple-virtual-directories-to-a-single-azure-website


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

2/2:

109003-image.png

On the Publish dialog, you need to choose the appropriate virtual App. Then you need to include the virtual directory path in the “`Site Name`” and “`Destination URL`” sections on the Connection tab.


For publishing only to the sub directory or new virtual directory, you may modify the PublishSettings file. In the file you need to modify the msdeploySite element and destinationAppUrl element, need to use the appropriate app/directory.

Alternatively, as your requirement fits. Since you pay only for App Service Plan, you can have those (apps1/2//3) as individual apps. You can have multiple apps in an App Service Plan- You can continue to add apps to an existing plan as long as the plan has enough resources to handle the load. The apps in the same App Service plan all share the same compute resource.

0 Votes 0 ·
image.png (10.2 KiB)

Hey @ajkuma-MSFT

Thanks for the help! Will definitely give this a try as I think this may be the way to get what I need. Glad it can be covered under the same App Service Plan as well.

0 Votes 0 ·

@AdrianN-4768, Glad you found the information helpful. Sure, please try and let us know. Thanks for the follow-up.

To benefit the community find the right answers, please do mark the post which was helpful by clicking on ‘Accept Answer’ & ‘Up-Vote’.

0 Votes 0 ·