Skip to content

Instantly share code, notes, and snippets.

@hewersonfreitas
Created January 22, 2020 13:56
Show Gist options
  • Save hewersonfreitas/91425c87fcf8831ea1797c02817e4262 to your computer and use it in GitHub Desktop.
Save hewersonfreitas/91425c87fcf8831ea1797c02817e4262 to your computer and use it in GitHub Desktop.
>> 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