-
I want to configure a route to the subdomain, in code, I loaded the certificate and configured, listenOptions.UseHttps: options.Listen(IPAddress.Any, 443, listenOptions =>
{
listenOptions.UseHttps(new HttpsConnectionAdapterOptions()
{
ServerCertificate = x509cerificate;
});
}); appsettings.json: {
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Information",
"Yarp": "Information",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.ReverseProxy": "Information"
}
},
"Urls": "https://*.**mydomain.com**",
"AllowedHosts": "*",
"ReverseProxy": {
"portalRoute": {
"ClusterId": "clusterPortal",
"Match": {
"Hosts": [
"portal.mydomain.com"
],
"Path": "{**catch-all}"
},
"transforms": [
{
"pathPattern": "{**catch-all}"
}
]
}
,
"Clusters": {
"clusterPortal": {
"Destinations": {
"destination1": {
"Address": "https://company.portal.eu:44037"
}
}
}
}
}
} Attempt to access subdomain using https:// portal.mydomain.com/Check , not routed and not logged. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Q: It may be syntactic sugar that I am not aware of, but why is URLs specified as "https://*.mydomain.com" with the extra * around the domain name? |
Beta Was this translation helpful? Give feedback.
-
Please try increasing the log level for "Microsoft" so you can get detailed logs from the host and routing to ensure that requests are coming in. See https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-7.0#configure-logging and https://microsoft.github.io/reverse-proxy/articles/diagnosing-yarp-issues.html |
Beta Was this translation helpful? Give feedback.
-
Urls is having no effect in this case, Listen is overriding it. That's ok, it wouldn't have done anything differently, kestrel doesn't check the host name. It only has special handling for IPs and localhost.
What does happen? What response does the client get? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your help, issue solved - configuration of the azure windows virtual machine netwok. YARProutse properly to subdomins. |
Beta Was this translation helpful? Give feedback.
-
YARP is ok. |
Beta Was this translation helpful? Give feedback.
Thank you for your help, issue solved - configuration of the azure windows virtual machine netwok. YARProutse properly to subdomins.