Web app for containers not working with nginx and AD B2C

Claes Erikhans 96 Reputation points
2020-06-02T20:01:09.877+00:00

Hi!

We have a multicontainer app running on a web app for containers(linux) and are running in to all sorts of issues we cant solve.

The app consists of three docker containers:

  • Blazor fronend
  • .net core webapi
  • Nginx as reverse proxy

Update 1

I removed some things i found is not related to the problem which seems to be the app service not mapping to port 443 inside the container but
instead is using port 80 which does not exist in the nginx config.

This article: https://learn.microsoft.com/en-us/azure/app-service/containers/app-service-linux-faq#custom-containers is from 2018 so i dont know if it's relevant but
it states that

Only one container can be open for access
Only port 80 and 8080 is accessible (exposed ports)

in which case it's not possible to use nginx with ssl on a web app for containers. But according to some other posts it should be possible with
the websites_port and port app settings..

Can someone please clarify if this is the case?

I set it up with ACI instead but using the web app would be ideal.

I have tried setting
WEBSITES_PORT to 443 and just using the nginx sever block for ssl

WEBSITES_CONTAINER_START_TIME_LIMIT to a higer value to make sure it's not an issue with the app starting but according to other questions iv'e looked into
it's because as i said above, azure cant get a reply from the container so it wont start because of that.

Can someone help me with what i am missing here? Can this be done or do we need another approach?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,909 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,652 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful