Hi, i’m on VPS under Ubuntu, i got nginx proxying strapi to api.mydomain.com right now i’m trying to get acme.sh to issue me a cert, i try to point it to myStrapiApp/public but i get only 404 out of it, any hint
So with Let’s Encrypt you have a few different challenge methods:
- HTTP-01 or commonly called file based using
.well-known
- DNS-01 using a DNS API (Cloudflare, ect)
What it appears you are trying to do is the HTTP-01 method and attempting to use a Strapi folder to handle that (proxy). If you absolutely need HTTP-01 then you will want to define a more standard directory within Nginx to handle that. However I personally recommend you use DNS-01 as it doesn’t rely on the server to host a file (complex routing, ect) and instead uses your DNS hosts API to create a TXT record.
For some usage with DNS-01 and acme.sh see this page on their wiki: dnsapi · acmesh-official/acme.sh Wiki · GitHub
As a small benefit to DNS-01 you can also issue “Wildcard” certificates so that you only need to manage one cert for all of your subdomains aka *.domain.tld
Which DNS provider are you using for your domain?