Set web.config for letsencrypt - Certify with Asp.NET Core and Angular 2 (Javascript-services)

前端 未结 3 1432
说谎
说谎 2021-01-02 20:47

I am trying to install letsencrypt certificate with Certify, but I get error, which (I think) has nothing to do with Certify. Problem is how my web.config is configured for

相关标签:
3条回答
  • 2021-01-02 21:42

    Put this in the .\.well-known\acme-challenge\Web.Config file just next to the Lets Encrypt DNS verification file(s). No need to change the Web.Config you already have. All it does it tell IIS to cough up files without extension in the directory where this Web.Config resides with mime type text/plain as Lets Encrypt expects that.

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <staticContent>
                <mimeMap fileExtension="." mimeType="text/plain" />
            </staticContent>
            <handlers>
                <clear />
                <add name="StaticFile" path="*" verb="GET" modules="StaticFileModule" resourceType="Either" />
            </handlers>
        </system.webServer>
    </configuration>
    
    0 讨论(0)
  • 2021-01-02 21:44

    In my case, the problem was I forgot to remove App_Offline.htm while issuing the request. After removing it, the problem disappeared.

    0 讨论(0)
  • 2021-01-02 21:52

    The problem I ran into with the default web.config in the acme-challenge folder was that the applicationhost.config contained:

    <section name="handlers" overrideModeDefault="Deny" />
    

    The handlers section in the acme-challenge web.config therefore was not allowed with the result that the challenge failed. In this case the solutions were: Change applicationhost.config line to:

    <section name="handlers" overrideModeDefault="Allow" />
    

    Or ... Remove the handlers setting from the web.config in acme-challenge folder.

    0 讨论(0)
提交回复
热议问题