How to create a ssl certificate using letsencrypt in your mac for your own domain
brew install certbot
mv <ToMyWorkingFolder>
certbot certonly --manual --preferred-challenges=dns -d <mydomain.com> --logs-dir . --work-dir . --config-dir .
# Follow the instructions to validate your domain
In my nginx config what I need are these 2 generated files:
- ./live/<mydomain.com>/cert/fullchain.pem
- ./live/<mydomain.com>/cert/privkey.pem
And I have to added them in this nginx config section:
server {
listen 443 ssl;
ssl_certificate /etc/ssl/fullchain.pem;
ssl_certificate_key /etc/ssl/privkey.pem;
[...]
}