Last active
December 13, 2016 19:54
-
-
Save charly-vega/46f9c11d82d2f2402b989fb68a78ecb8 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
wget https://dl.eff.org/certbot-auto | |
chmod a+x certbot-auto | |
sudo mkdir -p /var/www/pokemon-go-chat-production.beta.uy | |
sudo vim /etc/nginx/sites-available/pgc_api_production.conf | |
# server { | |
# ... | |
# location /.well-known/acme-challenge { | |
# root /var/www/pokemon-go-chat-production.beta.uy; | |
# } | |
# } | |
sudo service nginx reload | |
./certbot-auto certonly --webroot -w /var/www/pokemon-go-chat-production.beta.uy -d pokemon-go-chat-production.beta.uy | |
# Check renewal | |
./certbot-auto renew --dry-run | |
# Schedule twice per day | |
crontab -e | |
# ********* NEEDS PASSWORDLESS SUDO ********* | |
# 0 0,12 * * * /home/deploy-user/certbot-auto renew --quiet --no-self-upgrade | |
# tail /var/log/letsencrypt/letsencrypt.log | |
# Standalone mode (checked less frequently because of nginx interruption) | |
# ********* NEEDS PASSWORDLESS SUDO ********* | |
# 0 6 1/2 * * /home/deploy-user/certbot-auto renew --standalone --pre-hook "service nginx stop" --post-hook "service nginx start" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment