ohadschn/letsencrypt-webapp-renewer

Web Root Path

Richy1989 opened this issue · 2 comments

My Azure Web App (Running a Blazer Application) was always redirecting every request to a subfolder of wwwroot. So that the ACME Challange (.well-known directory) could not be found on the server.

After checking the code of LetsEncrypt.SiteExtension.Core I found the configuration parameter:
letsencrypt:WebRootPath. With this parameter the path of the .well-known directory could be changed.

I suggest adding that parameter into the PowerShell script.

OK, I see it too: https://github.com/sjkp/letsencrypt-siteextension/blob/f2e8f392cd7706d3f71bc5d1fcbde1e69d120e91/LetsEncrypt.SiteExtension.Core/Services/KuduFileSystemAuthorizationChallengeProvider.cs#L71

I think the only reason it worked for you was somewhat of a fluke (and won't work if you have several sites with different letsencrypt:WebRootPath values: sjkp/letsencrypt-siteextension#241.

I think I'll wait for a proper fix before I add it in a consistent manner to the webjob, but I suppose it can't hurt to add it to the script in the meantime. If you'd like to submit a PR I'll merge it...

The latest version of the LE extension now allows passing the webroot path programmatically.