Last active
September 14, 2018 14:02
-
-
Save shmdt/a7940fae0df054d1b6a9c49edf7f93fb to your computer and use it in GitHub Desktop.
certbot webroot flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir path/to/frontend | |
mkdir path/to/backend | |
add to /etc/nginx/sites-enabled/frontend | |
server { | |
location ~ /.well-known { | |
allow all; | |
default_type "text/plain"; | |
root path/to/frontend; | |
} | |
} | |
add to /etc/nginx/sites-enabled/backend | |
server { | |
location ~ /.well-known { | |
allow all; | |
default_type "text/plain"; | |
root path/to/backend; | |
} | |
} | |
sudo nginx -t | |
sudo service nginx restart | |
sudo certbot certonly --webroot -w path/to/frontend -d example.com -w path/to/backend -d api.example.com | |
check if everything is ok with certbot renew use this command: sudo certbot renew --dry-run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment