When I define my .NET Core application to run on Linux in Azure App Services with linuxFxVersion: 'DOTNETCORE:8.0'
and reserved: true
, I keep getting HTTP 404 responses from Nginx.
The application works fine on Windows in Azure App Services.
Looking at the logs, it seems like App Services is downloading a PHP image and that it runs PHP 8.0.x.
Has anyone experienced something similar and knows how to fix it?
Code:
resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
name: appServicePlanName
location: location
sku: environmentConfigurationMap[environment].appServicePlan.sku
properties: {
reserved: true
}
kind: 'linux'
}
resource appServiceApp 'Microsoft.Web/sites@2022-03-01' = {
name: appServiceAppName
location: location
identity: { type: 'SystemAssigned' }
properties: {
serverFarmId: appServicePlan.id
httpsOnly: true
siteConfig: {
linuxFxVersion: 'DOTNETCORE:8.0'
// netFrameworkVersion: 'v8.0'
appSettings: [
{
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
value: applicationInsights.properties.InstrumentationKey
}
{
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
value: applicationInsights.properties.ConnectionString
}
]
}
}
}
Error: