certbot --authenticator standalone --installer apache -d your-domain.com \ --pre-hook "systemctl stop apache2" \ --post-hook "systemctl start apache2"