I am trying to get Let’s Encrypt working on a Debian Stretch machine running Elixir 1.9.4. I installed Certbot and run
sudo certbot certonly --webroot --webroot-path /path_to_my_project/priv/static
which failed, as an invalid response was received:
" […] Phoenix.Router.NoRouteError at GET /.well-known/acme-challen"
Judging by information provided by this helpful guide, the problem is due to the non-serving of static assets from this hidden directory:
/priv/static/.well-known/acme-challenge
When I place, for example, a png inside /acme-challenge, the png is inaccessible from my browser. If I then rename /.well-known to /well-known, I am able to access it. As far as my Endpoint configuration is concerned, I am not setting either :only or :only_matching under Plug.Static, but even when I tried an :only word list that included “.well-known”, it did not work.
Any ideas as to what I should be trying next?