Verifying a Cert Request from LetsEncrypt

Certs. Ugh.

For reference, this is a previous post the brought about this issue:

So, I’m trying to manually apply a cert to an instance of UD running in a Linux container on the Azure Container Instances platform. To do this, you have to answer an acme-challenge. The instructions tell you to create a path to a file container just text, named a specific thing, in the folder path webroot/.well-known/acme-challenge/specificName, where webroot is the top level of the site. I’m not sure how to accomplish this.

I’ve added folder’s to the root level of what I think is the website, namely the folder containing the dashboard.ps1. I’ve also tried adding a page with that path and the string is the only content of the page, but instead I get a page not found error page. Do I need to do something with new-udhtml?

EDIT: This may be possible with Publish-UDFolder…

I was able to do this by using Publish-UDFolder like so:

$wellknown = Publish-UDFolder -Path  (Join-Path -Path $Cache:RootPath -ChildPath '/.well-known/acme-challenge') -RequestPath '/.well-known/acme-challenge'

I passed $wellknown to the PublishedFolder parameter and put the file in that path and the challenge was met!

2 Likes