Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lucasapoena/074c41f5f34a1315fd3ed98fae7239da to your computer and use it in GitHub Desktop.
Save lucasapoena/074c41f5f34a1315fd3ed98fae7239da 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