When you don't have the luxury of having a vendor-provided SSL certificate on your server but the vendor somehow allows you to enter your own SSL certificate, this solution is for you.
If you are running a newer version of Ubuntu, you will have to use,
sudo apt-get install software-properties-commonIf you are using an older version of Ubuntu, use
sudo apt-get install software-properties-common python-software-properties
Then add certbot PPA
sudo add-apt-repository ppa:certbot/certbot
Note: The PPA is deprecated. Instead, you can use Snap if you preffer.
Run update if not automatically performed.
sudo apt-get update
Then install certbot for apache, assuming you have Phython 3
sudo apt-get install python3-certbot-apache
If you have an earlier python version
sudo apt-get install python-certbot-apache
Then you can use certbot to issue an SSL certificate for your domain.
If you are running certbot on the server itself,
sudo certbot --apache -d example.com
If you are running certbot on your own computer rather than on a server, which is the main case we are discussing here. In this example we are using
httpverification method. You can use
dnsverification method instead of http as well.
sudo certbot certonly --manual --preferred-challenges http -d example.com -d www.example.com
Then you will have to follow the instructions on the CLI screen.
You will be instructed to create a file containing a string of characters on your server (usually in.well-known/acme-challengefolder)
Enter, it will verify the domain and show you the location (directory/folder) the keys were saved.
No comments:
Post a Comment