SSL Cert for WordPress on LightSail

Hi there,

I am beginner and my first time to use AWS LightSail for Wordpress. I’m trying to follow this guide from AWS Lightsail here

I’m current at Step 2 on item #5 and encounter this issue, it seems that repository is not available.

I ran this command:

sudo apt-add-repository ppa:certbot/certbot -y

It produced this output:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 688, in addkey_func
    func(**kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 386, in add_key
    return apsk.add_ppa_signing_key()
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 252, in add_ppa_signing_key
    tmp_keyring, tmp_secret_keyring, signing_key_fingerprint, tmp_keyring_dir):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 181, in _recv_key
    "--recv", signing_key_fingerprint,
  File "/usr/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gpg': 'gpg'

My web server is (include version):
Apache 2

The operating system my web server runs on is (include version):
Debian 10

My hosting provider, if applicable, is:
AWS LightSail

I can login to a root shell on my machine (yes or no, or I don’t know):
Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
LightSail’s Control Panel

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):
I don’t have the certbot yet.

@pmventura Welcome to the community!
You might want to have look at:


for comparison.
Rip

Are you using Bitnami?

If so, check their documentation:

https://docs.bitnami.com/general/faq/administration/generate-configure-certificate-letsencrypt/

Hi @9peppe,

Thanks for you suggestion. Yes, I’m using the bitnami… I tried to execute the one you suggested.

Executed Command:

sudo /opt/bitnami/bncert-tool

Result

Warning: The domain 'mydomain.com' resolves to a different IP
address than the one detected for this machine, which is '54.169.135.131'.
Please fix its DNS entries or remove it. For more info see:
https://docs.bitnami.com/general/faq/configuration/configure-custom-domain/

P.S. I have the domain attache to another website which has SSL enabled from certbot as well. How can I remove the SSL from the one using it?

Btw, I also tried the suggested solution of bitnami above.

Step 1:

cd /opt/bitnami/apps/wordpress
sudo ./bnconfig --machine_hostname my-blog.com

Step 2:

sudo /opt/bitnami/bncert-tool

And I got the same error again…

You have some kind of dns misconfiguration, according to that error (your domain points to the wrong server). If and how you want to correct it depends on what you want to do.

@9peppe basically I just wanted to transfer that domain into a new server which uses AWS Lightsail.

Could you give me some advised on how I can fix it?

go in your dns panel and replace the old server ip address with the new server ip address.

@9peppe Thank you so much! It’s now working… The SSL works fine as well