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!