How can I install the SSL certificate on my Ubuntu VM with subdomain name?

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version): Apache/2.4.43 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 18.04 VM

My hosting provider, if applicable, is:

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): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.31.0

Hi i have setup a wordpress environment on a local ESXi (VMware) server and installed a ubuntu 18.04 with Apache/2.4.43. on our web-hosting i added subdomain recored pointing to our public IP address and on our router i forward port 192.168.X.X:8081 as well added the default web-server port 8081. I successfully able to see my Local wordpress site using the public IP. however when i tried to generate an ssl through ssl via certbot i get an error

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: test.example.com
    Type: connection
    Detail: Fetching
    http://test.example.com/.well-known/acme-challenge/tXXXXXXXYYYY…
    Error getting validation data

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you’re using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

I have checked that the port 8081 and it’s open, as well disabled VM firewall but still get the same error.

is there a different process between VM and and non VM host to install SSL ? or how does it work and what is the solution?

Thank you

Hi,

Well, VM and VPS/Dedicated server does have some difference in setup, but that’s not the issue here.

The issue is, with HTTP based validation, Let’s Encrypt’s validation server will only try to reach port 80 of that IP.
As you described, only forwarding port 8081 is not enough. You can use redirection to make requests redirect from port 80 to other ports, but port 80 must be open and running in order to accept connection.

If you can’t open port 80, you might want to see if your domain’s DNS provider has API support or existing integration for you to use in ACME clients with DNS TXT challenge. (Or a rare circumstances, use port 443 for TLS challenge)

You can read more about challenge type and requirements in this link: https://letsencrypt.org/docs/challenge-types/

Thank you

2 Likes

Thank you for this great information, it’s clear now what is the problem. i have tried to open port 80 for that ip however didn’t work. during one of the setups of the server i tried once to install ssl and it gave me the option to add TXT next to the subdomain and it was successful, not sure if it was docker wordpress setup on ubuntu or without. this time i only get and error but not the TXT option. is there any different process / commands to get the reply with the TXT? i have contacted the DNS provider.

Thank you

Hi Guys,

I have test port 80 using netcat with telnet and the port is blocked by the ISP. our hosting came back and they can use TXT option, can you please let me know the process to generate DNS TXT challenge when running certbot or any other method?

Thank you

There are actually two options:

  1. Use API from your DNS provider to automate the process (it need to be supported by the ACME client you are using)
    https://certbot.eff.org/docs/using.html#dns-plugins
  2. Use manual plugin to generate TXT records, add it to your DNS and verify manually. If you choose this option without a way to automate it properly, you’ll need to perform this every two months.
    https://certbot.eff.org/docs/using.html#manual

Since you didn’t provide any information on your domain, I can’t suggest which one you can or should use (regardless, you can always use the manual mode), so please click on the links above for each option (those are on the same page so hopefully it won’t be lengthy for you)

1 Like

Hi @stevenzhu,

The subdomain name i’m trying to install the SSL is http://worddev.avsion.com.au if you can have a look and let me know what method is best that will be great. my hosting is with https://ventraip.com.au/ i can see that they have auto ssh however no option available on the management page to use for subdomain.

Thank you

Hi,

From what I see there isn’t an API that can handle your request automatically. So you might need to use manual authenticator or consider alternative clients such as acme-dns.

Thanks