简体   繁体   中英

Routing API project and Web Application project in the same domain (Azure)

Background

I have two separate projects in my solution. One of them (the web application project) is responsible to show the landing page (on the root of the domain, say www.example.com) and a documentation for the API (say www.example.com/documentation).

The other project is responsible for the API itself. It's path must be www.example.com/api/v1/ to ensure compatibility with our previous software.

We made this way to be able to publish updates to any of the projects without the need to publish the entire solution, and of course, for organization.

Problem

I don't get how to configure the applications to run on Azure on the same domain with different routes, and I'm stating to fear that it is not possible.

I already tried to configure a subdomain (say api.example.com/v1), but it can't be done because we will break the compatibility with our current clients.

This question is almost what I'm looking for, but it does not show how to do on Azure, and this one is on Azure but using subdomains.

  • First: you have to create 2 folders, 1 for your web api and the second for your web app
  • second: you have to set the two folders as an application.

after doing those two steps you can acces to the two folder by puting:

  • www.yourdomaine.com(or another)/nameofyourfolder

good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM