-
cd /usr/local/bin
-
yum install letsencrypt
ORwget https://dl.eff.org/certbot-auto
ORsudo snap install --classic certbot
-
chmod 777 ./certbot-auto
-
cd certbot-auto
-
./certbot-auto certonly --manual --preferred-challenges=dns --email [email protected] --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d *.domain.com,domain.com
-
The above command would ask to add one TXT record to your DNS Records add it and then check using DNS Lookup Checker. If the record is updated and it shows then you can proceed further and press Enter on the terminal.
-
Remember the path where certificate files are generated. There would be 5 files as following:
cert.pem
chain.pem
fullchain.pem
privkey.pem
README
- Now to get those certificate installed in IIS, you need to download OpenSSL GnuWin32 on Windows system and copy all those certificate files to Windows New Folder on Desktop.
- OpenSSL for Windows - Complete package, except sources
- Install the program and copy those generated
.pem
files to Installed Path/bin - Open CMD with Administrator Rights then cd to that openssl bin path.
- Execute the following command which would generate a
.pfx
file from.pem
openssl pkcs12 -export -out certificate.pfx -inkey privkey.pem -in fullchain.pem -certfile cert.pem
- This would ask a password remember it and write down in the
.txt
file somewhere. - It would generate a
certificate.pfx
on that same location. - Now Open Start > Run >
certlm.msc
or Control Panel > Searchcertificate
> Open Manage Computer certificates - Go to Web Hosting > Right Click empty space > All Tasks > Import > Select the
certificate.pfx
and add password and Import it. - Right Click imported certificate and View > Add Friendly Name.
- Check Certificate in IIS.
For some Windows users, if the PFX importing shows "The password you entered is incorrect" then it might be some other issue.
Try generating the pfx using the following arguments of the command.
For example
Reference answer