LetsEncrypt SSL for Bleckmann Custom URL - Updated

From Apoyar Wiki
Jump to navigation Jump to search

Enable the custom_initiate_certbot.conf file in sites-available on BOTH fe servers, make sure to replace the server_name (and server_root if needed): DONE

cd /etc/nginx/sites-enabled

ln -s ../sites-available/custom_initiate_certbot.conf ./custom_initiate_certbot.conf -- DONE

vi ./custom_initiate_certbot.conf

Then check: nginx -t

If ok, reload: systemctl reload nginx --> DONE

Do your certbot command: certbot certonly --webroot -w /var/www/halivephp84/bleckmannci4/ -d returns.killstar.com

Make sure to provide correct root and domain (same ones as in the nginx configuration file)

If certificate is granted, disable the temp config again:

rm /etc/nginx/sites-enabled/custom_initiate_certbot.conf -- DONE on both servers

Prepare final configuration file from template:

cp -pv /etc/nginx/sites-available/custom_template.conf /etc/nginx/sites-available/custom_<DOMAIN NAME HERE>.conf

Replace the domain names in the config file:

sed -i 's|REPLACEME|<DOMAIN NAME HERE>|g' /etc/nginx/sites-available/custom_<DOMAIN NAME HERE>.conf

Enable the config:

cd /etc/nginx/sites-enabled

ln -s ../sites-available/custom_<DOMAIN NAME HERE>.conf ./custom_<DOMAIN NAME HERE>.conf

Then check: nginx -t

If ok, reload: systemctl reload nginx

Note: replace <DOMAIN_NAME_HERE> in the previous commands by, for example, returns.killstar.com