How to set up AutoSSL on different port

TechBill

Member
Aug 7, 2011
20
1
53
I am running a web script that is on a different web port. How do I get AutoSSL to install certification for web sites that are running on different port other than standard port 80.

Example : https://example.com:10000
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,272
313
Houston
Hi @TechBill


The issue isn't the installation of the certificate it's the VirtualHost - you'd need to create an SSL VirtualHost with the certificate details or modify the template. The documentation for this can be found here: Custom Templates - EasyApache - cPanel Documentation

This would be a customization that wouldn't be supported by cPanel though and could potentially cause issues if done incorrectly.
 

TechBill

Member
Aug 7, 2011
20
1
53
Hi @TechBill


The issue isn't the installation of the certificate it's the VirtualHost - you'd need to create an SSL VirtualHost with the certificate details or modify the template. The documentation for this can be found here: Custom Templates - EasyApache - cPanel Documentation

This would be a customization that wouldn't be supported by cPanel though and could potentially cause issues if done incorrectly.
As I read the documentation and if i understand this correctly,

I would need to make a local copy of the ssl vhost template and change this line

<Proxymatch ^https?://127\.0\.0\.1:(2082|2083|2077|2078|2079|2080|2086|2087|2095|2096)/>
to
<Proxymatch ^https?://127\.0\.0\.1:(2082|2083|2077|2078|2079|2080|2086|2087|2095|2096|10000)/>
by adding port 10000?

and save it in the userdata directory?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello @TechBill,

The updated instructions for EasyApache 4 are available on the following link:

Custom Templates - EasyApache 4 - cPanel Documentation

However, can you confirm if all domains are using the custom port? Or, do you host a mixture of domains with some using the custom port and others using the default port?

If all domains are using the custom port, you can simply browse to WHM >> Tweak Settings and modify the port next to the following option under the System tab:

Apache SSL port

Otherwise, you'd need to consider modifying the Apache template for individual virtual hosts per the instructions in the above document.

I would need to make a local copy of the ssl vhost template and change this line

<Proxymatch ^https?://127\.0\.0\.1:(2082|2083|2077|2078|2079|2080|2086|2087|2095|2096)/>
to
<Proxymatch ^https?://127\.0\.0\.1:(2082|2083|2077|2078|2079|2080|2086|2087|2095|2096|10000)/>
by adding port 10000?
No, those are entries for the Service Subdomains feature (e.g. cpanel.domain.tld). Here's a link to a thread you may want to use as a point of reference if you are open to using ProxyPass entries to redirect requests from the custom port to the standard port on an individual domain's SSL virtual host:

Jira mod_proxy subdomain

Thank you.