I have a site built with Elixir Phoenix frame work. The website runs fine in both dev and prod mode.
When the phoenix server is running in dev mode, I have no issue renewingLet's Encrypt certificate, but when the exact same app is running in prod mode, I keep getting permission error when trying to renew. Please noted that I am talking about the exact same app, on the same FreeBSD server, executed by the same user - both command without sudo
. The only difference is MIX_ENV=prod
I also noted that in prod mode, the phoenix server log an 404 error when Letsencrypt is trying to access my priv/static/.well-known/acme-challenge/(some-unique-string)
My basic set up for phoenix + letsencrypt is detailed in this blog post
The question is: how is phoenix server treating directory/file permission differently between `prod' and 'dev' mode?
- Using Elixir 1.2.4 and Phoenix 1.1.4
UPDATE:
Folks, since LetsEncrypt and Phoenix framework evolve rapidly, the issue I listed above is no longer an issue if you are using the latest cerbot from LetsEncrypt and Phoenix 1.2.0
This is not necessary an answer to the original questions though.
ls -al
output on this file? – tkowaldev
with myprod.exs
renamed todev.exs
certbot is successful, and the logger is quiet. When I run it inprod
with theprod.exs
properly named the router logs aGET
request for/.well-known/acme-challenge/random_file_name
does anyone know about a default config option on the router when the env is set toprod
or is this a non-issue? – brittonjb