Add port to a domain

I would like to know how I can do so that my domain works with SSL under a port for example https://mydomain.com:35672 my domain if the port works correctly with SSL but when adding the port I get an error, The connection is not private , there will be some way to correct that error.

Yes, it will be in the configuration of whatever service is running on port 35672. The certificate is issued for a specific set of DNS names, irrespective of port numbers. So you'll need to configure whatever that service is to use your new cert.

That is what I do not know, where to configure to use SSL on that port, in which part of nginx or the certificate for the site, I would like to know in which file I should configure the port.

How do you expect us to know? You have some service running on port 35672. That's a very non-standard port, so there's no way for anyone here to have any idea what service that would be. If you could share that information, it's possible (though by no means certain) that someone here will be familiar with it and give you some pointers on how to configure it.

This is why you're presented with a series of questions when you create a topic in the Help category, to help you give the information we need to be able to help you. When you delete those questions instead of answering them, you're putting yourself at quite a disadvantage.

You mentioned NginX, so I’m assuming you’re just running a website on that port (though I don’t know why you’d use that port)

In the server block of your sites configuration file add the following (adjusted as necessary)

listen 35672 ssl http2;
listen [::]:35672 ssl http2; << If you’re using IPv6
ssl_certificate /etc/letsencrypt/live/your domain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your domain/privkey.pem;

In nginx I have this:
listen [::]: 443 ssl ipv6only = on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/myweb.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/myweb.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

Add this:

listen [::]: 443 ssl ipv6only = on; # managed by Certbot
listen 443 ssl; # managed by Certbot

listen 35672 ssl http2;
listen [::]: 35672 ssl http2;

ssl_certificate /etc/letsencrypt/live/myweb.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/myweb.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

I do not know if I am correct or should I delete listen 443 since the port is still not working when I enter https: // myweb: 35672 I get the error, The connection is not private, this in google chrome.

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