SSL for custom port

I use webmin and virtualmin to host many domains in VPS with Centos 7 OS.
Apache Server

www.example1.com uses default ports (80 and 443)
www.example2.com is served at VPS_IP:3001

Both domains have LetsEncrypt SSL successfully installed.

Problem:
example1DOTcom is properly resolving to https

example2DOTcom is resolving to http

Please advice what to do in Apache Server/Webmin/Virtualmin in order to get example2DOTcom resolved to https

Action that I did (after reading some advice in serverfault forums)
I went to Webmin->Servers->ApacheServer->Edit Global configuration and changed the following:
VirtualHost VPS_IP:443

To
VirtualHost VPS_IP:3001

Restarted Apache…But still example2DOTcom resolves to http only and NOT to https.

Please help for proper solution so that exmaple2DOTcom can resolve to https

Thank you

Hi,

For newly created site in the future use:

For existing websites, you can always add this manually, just like this:

I tried second option, as it is an existing website.
What I observe is that it is not “force” redirect to https
Still the http version of the website is being served, which brings me to the same status as before.
I even have used the .htaccess option to force to https in conjunction to the second method. Still the http website is being served.

But for example1DOTcom, I did not try the suggested method. Yet, it can resolve to https without any issue using .htaccess