Securing websites running on CentOS with Apache 2.4
git clone https://github.com/certbot/certbot
cd certbot
./certbot-auto --help
yum install epel-release
To run the webroot commands setup the domain correctly on http and make sure access to .well-known is allowed.
Otherwise you will need to shutdown apache and use the –standalone flag.
sudo ./certbot-auto certonly -a webroot --webroot-path /home/username/html/domain.tld/ --agree-tos --debug -d www.domain.tld
sudo ./certbot-auto certonly -a webroot --webroot-path /home/username/html/domain.tld/ --agree-tos --debug -d domain.tld
sudo ./certbot-auto certonly -a webroot --webroot-path /home/username/html/domain.tld/app/ --agree-tos --debug -d www.domain.tld
sudo ./certbot-auto certonly -a webroot --webroot-path /home/username/html/domain.tld/app/ --agree-tos --debug -d domain.tld
sudo ./certbot-auto certonly -a webroot --webroot-path /home/username/html/domain.tld/app/public/ --agree-tos --debug -d www.domain.tld
sudo ./certbot-auto certonly -a webroot --webroot-path /home/username/html/domain.tld/app/public/ --agree-tos --debug -d domain.tld