certbot --nginx certonly
server {
rails_env production;
listen 443 ssl; # managed by Certbot
ssl on;
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/sub.domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/sub.domain.com/privkey.pem; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
server_name sub.domain.com;
passenger_enabled on;
root /home/rails/my-project/current/public;
}
certbot renew --dry-run --nginx-server-root /opt/nginx/conf --nginx-ctl /opt/nginx/sbin/nginx
0 */12 * * * certbot renew --nginx-server-root /opt/nginx/conf --nginx-ctl /opt/nginx/sbin/nginx