SSL on domain.com:port

William Dinh

New member
Joined
Feb 14, 2020
Messages
7
Hi guys,
So currently, I have a website with a main domain like : https://mydomain.com. Usually, if I want to login DA, I have to type the IP address with my port ( like 1.2.3.4:2222 ), or I can get access to DA by typing mydomain.com:2222. As far as I know, IP Address cannot have SSL unless I have purchased a certificate instead of free SSL. But how about the domain ? My domain still has the Let's Encrypt SSL but mydomain.com:2222 doesn't have SSL. Is there anyway I can get access to mydomain:2222 and still have the SSL ?

I'm still new with DirectAdmin and all other stuffs so please help me, thank you very much guys.
 
Thank you for replying my post,
How to disable force_hostname= ? Do I need to delete this line, or I can just simply delete the value of force_hostname= ?
 

Hi, a little question, I use Digital Ocean, so I set the VPS name ( which as I know, is the server name ) to server.domain.com.
Then I web to direct admin and set host name to the same server name I gave to the VPS, but when I followed the second step to create SSL for hostname, I ran into an error which said :


Setting up certificate for a hostname: server.domain.com
Error: http://server.domain.com/.well-known/acme-challenge/letsencrypt_1582100980 is not reachable. Aborting the script.
dig output for server.domain.com:
Please make sure /.well-known alias is setup in WWW server.

I've been searching for this error, I don't know If there's anything wrong, do I have to create an A record for the hostname or anything else ?
 
Hi, a little question, I use Digital Ocean, so I set the VPS name ( which as I know, is the server name ) to server.domain.com.
Then I web to direct admin and set host name to the same server name I gave to the VPS, but when I followed the second step to create SSL for hostname, I ran into an error which said :


Setting up certificate for a hostname: server.domain.com
Error: http://server.domain.com/.well-known/acme-challenge/letsencrypt_1582100980 is not reachable. Aborting the script.
dig output for server.domain.com:
Please make sure /.well-known alias is setup in WWW server.

I've been searching for this error, I don't know If there's anything wrong, do I have to create an A record for the hostname or anything else ?
The hostname you have chosen within DO is irrelevant.

That error is most likely because you haven't set the DNS record for your hostname. Login to your registrar, or whatever service is responsible for managing your DNS records for the domain, and add a CNAME record of "server" and have it point to the IP address of your server. Once that propagates, repeat the steps and the SSL certificate will be issued without any errors.
 
Back
Top