Error while installing SSL certificate


#1

OS = Ubuntu 16.04
Web server = nignx

I will install ssl certificate on the following domain (portal.mywebsite.com:8888)

sudo certbot --nginx -d portal.mywebsite.com:8888
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
An unexpected error occurred:
The request message was malformed :: Error creating new authz :: Invalid character in DNS name

NOTE:
I installed letsencrypt certificate on the same server, but to (portal.mywebsite.com) and it works fine.


#2

You can’t add a port number, that’s not part of a hostname.


#3

this server has 2 projects, the first one on the 443 port, the second one on 4000 port.
the first one works correctly, but the second is not, what should I do?


#4

Two projects, both with the same domain name? The port number is not a part of the hostname as previously mentioned and therefore is not relevant to the certificate creation.

Or, are there two different domains involved? If so, you will need either two different certificates or a certificate with a SAN depending upon how you wish to configure the webserver.


#5

If they’re on the same domain name, the certificate you already got for port 443 should be equally valid for any other port. You don’t need to get a second certificate, you just need to configure the server on the other port to use the same certificate.


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.