My requirement is simple.
I already have an one azure app service (https://<app_service>.azurewebsites.net/) and I hosted a NodeJs Web API app under that above mentioned app service. It worked fine when calling the API with specified app service URL(https://<app_service>.azurewebsites.net/).
My virtual path and physical path of the application is like in below image.
And this is my NodeJS web API app web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<webSocket enabled="false" />
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode"/>
</handlers>
<rewrite>
<rules>
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^index.js\/debug[\/]?" />
</rule>
<rule name="StaticContent">
<action type="Rewrite" url="public{REQUEST_URI}"/>
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
</conditions>
<action type="Rewrite" url="index.js"/>
</rule>
</rules>
</rewrite>
<security>
<requestFiltering>
<hiddenSegments>
<remove segment="bin"/>
</hiddenSegments>
</requestFiltering>
</security>
<httpErrors existingResponse="PassThrough" />
</system.webServer>
And this is my NodeJS web API app index.js
var express = require("express");
var app = express();
app.get("/", function(req, res) {
res.send("Call from Node API!!!");
});
var port = process.env.PORT || 1660;
var server = app.listen(port, function () {
console.log("Listening on port %s...", server.address().port);
});
Now, I want this same NodeJS Web API application with another virtual path with same azure app service.
For e.g.,
(https://<app_service>.azurewebsites.net/nodeapi)
Is this possible to achieve? If so, could you please tell me how to achieve this.
Thanks in advance!


It is possible to deploy Multiple Web Apps under same App service by using
Import Profileand Adding Virtual Directories in Azure PortalCheck the below workaround
Created an App service with Runtime stack Node.
In the newly created app service add the virtual applications under
Configuration=>Path MappingsSectionIn the Overview Section of the App service, click on
Get Publish ProfileIn Visual Studio created two
NodeJSWeb ApplicationsRight click on the first web app and click on publish
Browse and select the PUBLISHSETTINGS file downloaded from
Azure Web Appfrom portal.Make sure that you are giving the site name as same. Here it is
NodeSample.Check and verify the name in both places (Virtual Applications and directories in Path Mappings and in
Publish Settings) are same.SaveandPublishthe App.Now select the second Web App and Continue the same steps to publish using Import Profile.
Deployed Web Apps folder structure
In this case Both the Apps are accessible by using the below URL's Ex: