Greetings.
From the conversation you had with ChaitanyaNaykodi-MSFT, I take it that
- You have two applications, app1 and app2 - they are Azure App Service
- You confirmed that app1 works, but not app2
- You also mentioned that app2 has a Private EndPoint (PE)
- Accessing the app2 from a VM in the VNET where the PE resides, gives you 200 responses.
Please let me know if this is incorrect.
My follow up questions would be,
- Are you trying to
- route requests to a single endPoint to 2 different Origins, app1 and app2 via Path matching, i.e., single AFD endpoint with 2 routes ?
- or created 2 separate endPoints, each with it's own Origins app1 and app2 and own routes?
- You mentioned you are using a Private EndPoint and you are able to access the App Service only via a VM in same VNET as the PE
- This is misleading.
- Note that a regular PE is not same as AFD Premium's PE. See : Connect AFD Premium to an App Service origin with Private Link
- If you haven't created a AFD PE, and your app2 is blocked for public access - this simply means AFD will not be able to access the app2 in any port.
- I see you got 200 responses when you access app2 via VM.
- As mentioned by ChaitanyaNaykodi-MSFT, "curl" by default would use port 80 only. Also, if you specify "https" , it would use 443 only. Please run,
curl http://app2-randomstring.<region>.azurewebsites.net:8080/onsite/report/healthcheck -I
-
- Can you also run
nslookup app2-randomstring.<region>.azurewebsites.net
? from this VM
- Can you also run
Analysis:
- AFAIK - your webapp is running in Port 80 only
- I tried to curl your web app on
- Port 80 - Getting 403 (meaning network blocked me, but still I was able to get a response)
- Port 8080 - No response, timed out
As next steps,
- From your screenshot, I do see that you have created a AFD Premium Private endPoint, so this should be fine.
- For testing
- You can change the port to 80 in the Origin configuration.
- If this works, it simply means your application is running on Port 80 all along
- In that case, you can refer to Configure port number to set the port to 8080
NOTE: If you have single endPoint and multiple routes, this is how it would look like,
Hope this helps.
Cheers,
Kapil