Search code examples
jekyllgithub-pageslets-encryptacme

Unable to publish subfolder under ".well-known" folder from GitHub Page


Tried to set up a GitHub page with a custom domain to fulfill the acme-challenge from cert generation ( Let's Encrypt ).

I managed to publish the .well-known folder by adding a _config.yml file with include: [".well-known"] content.

However, it does not work with the subdirectory of .well-known/acme-challenge and have no luck with these configurations include: [".well-known/acme-challenge", ".well-known", ".well-known/acme-challenge/index.html"]

The testing commands:

  • curl -v http://exptests.com/.well-known/index.html << works
  • curl -v http://exptests.com/.well-known/acme-challenge/index.html << does not work

My repo: https://github.com/blackjackyau/acme/tree/main/docs


Solution

  • Tried 3 of the approaches separately

    • include in _config.yaml
    • permalink (commit)
    • .nojekyll and .nojekyll + include

    and all of them are showing the same symptoms that only the acme-challenge URL .well-known/acme-challenge/xx is not working ( subdirectory will work if it is not acme-challenge ).

    I will conclude that the GitHub page has reserved or prevented the acme-challenge path/directory from overwriting. Interesting enough, this was perviously working as mentioned from the blog last year

    Update:

    Github page uses Lets Encrpyt to manage SSL for custom domain (doc) and this explains why the acme-challenge path is reserved from overwriting