LetsEncrypt-ACMESharp对IIS的http-01质询无效

时间:2017-05-09 00:18:26

标签: iis docker lets-encrypt windows-container

在我执行的服务器A(非IIS)上:

Import-Module ACMESharp
Initialize-ACMEVault
New-ACMERegistration -Contacts mailto:somebody@derryloran.com -AcceptTos
New-ACMEIdentifier -Dns www.derryloran.com -Alias dns1
Complete-ACMEChallenge dns1 -ChallengeType http-01 -Handler manual

回复问:

* Handle Time:      [08/05/2017 22:46:27]
* Challenge Token:  [BkqO-eYZ5sjgl9Uf3XpM5_s6e5OEgCj9FimuyPACOhI]
To complete this Challenge please create a new file
under the server that is responding to the hostname
and path given with the following characteristics:
  * HTTP URL:     [http://www.derryloran.com/.well-known/acme-challenge/BkqO-eYZ5sjgl9Uf3XpM5_s6e5OEgCj9FimuyPACOhI]
  * File Path:    [.well-known/acme-challenge/BkqO-eYZ5sjgl9Uf3XpM5_s6e5OEgCj9FimuyPACOhI]
  * File Content: [BkqO-eYZ5sjgl9Uf3XpM5_s6e5OEgCj9FimuyPACOhI.X-01XUeWTE-LgpxWF4D-W_ZvEfu6ue2fAd7DJNhomQM]
  * MIME Type:    [text/plain]

服务器B正在www.derryloran.com上为http://www.derryloran.com/.well-known/acme-challenge/BkqO-eYZ5sjgl9Uf3XpM5_s6e5OEgCj9FimuyPACOhI正确地提供一个页面我相信但当我回到服务器A时执行:

Submit-ACMEChallenge dns1 -ChallengeType http-01
(Update-ACMEIdentifier dns1 -ChallengeType http-01).Challenges | Where-Object {$_.Type -eq "http-01"}

...但几秒后状态无效。 FWIW我已多次尝试过这种情况,结果相同。为什么?我做错了什么?

我很欣赏在我获得证书之后还有更多的东西要去,但是这个网站是在Docker容器中提供的,因此服务器A / B的复杂性......

1 个答案:

答案 0 :(得分:0)

哦,多少次?!?在VS中创建时,该文件具有BOM。使用Notepad ++重新创建并保存为UTF-8(无BOM),我现在获得有效的响应。