Created
January 22, 2020 13:56
-
-
Save hewersonfreitas/91425c87fcf8831ea1797c02817e4262 to your computer and use it in GitHub Desktop.
This file contains 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
>> add lines in host nginx.conf | |
location ~ /.well-known{ | |
allow all; | |
} | |
>> restart nginx | |
service nginx restart | |
>> create folder ".well-known" in root path project | |
mkdir {PATH}/.well-known | |
>> add permissions in folder root path | |
chmod 755 -R {PATH}/.well-known | |
>> permissions in folders | |
chown -R www-data:www-data {PATH}/.well-known | |
>> create ssl | |
sudo certbot --authenticator webroot --webroot-path {PATH} --installer nginx -d {DOMAIN} --pre-hook "service varnish restart" --post-hook "service nginx reload" --renew-hook "service nginx reload" | |
>> add in cron | |
(crontab -l 2>/dev/null; echo '0 0,12 * * * certbot renew --quiet --post-hook "service nginx restart"')| crontab - | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment