Added Dedicated IP to new Domain, HTTPS now goes to “Default Web Site Page”

Operating System & Version
CentOS 7.9.2009
cPanel & WHM Version
102.0.18 (STANDARD)

Michael-Inet

Well-Known Member
Feb 20, 2014
134
20
68
Nashville, TN, USA
cPanel Access Level
Root Administrator
Hi All,

I’ve added dedicated IPs to domains many times (Apache/Nginx), but something seems to have changed with the process since I did it last.

This was the go to source, but the cPanel doc it referenced is now gone:


Digging it seems the Apache VirtualHost configuration is no longer being created correctly.

Code:
Show parsed settings...
VirtualHost configuration:
127.0.0.1:8080         [server-name] (/etc/apache2/conf/httpd.conf:301)
127.0.0.1:8443         [server-name] (/etc/apache2/conf/httpd.conf:1293)
[A.B.C].239:8080   is a NameVirtualHost
         default server [server-name] (/etc/apache2/conf/httpd.conf:322)
         port 8080 namevhost [server-name] (/etc/apache2/conf/httpd.conf:322)
         port 8080 namevhost [box-domain-name] (/etc/apache2/conf/httpd.conf:383)
                 alias mail.[box-domain-name]
                 alias www.[box-domain-name]
         port 8080 namevhost [subdomain-name-A].[box-domain-name] (/etc/apache2/conf/httpd.conf:456)
                 alias www.[subdomain-name-A].[box-domain-name]
         port 8080 namevhost [subdomain-name-B].[box-domain-name] (/etc/apache2/conf/httpd.conf:529)
                 alias www.[subdomain-name-B].[box-domain-name]
[A.B.C].239:8443   is a NameVirtualHost
         default server [box-domain-name] (/etc/apache2/conf/httpd.conf:821)
         port 8443 namevhost [box-domain-name] (/etc/apache2/conf/httpd.conf:821)
                 alias mail.[box-domain-name]
                 alias www.[box-domain-name]
         port 8443 namevhost [subdomain-name-A].[box-domain-name] (/etc/apache2/conf/httpd.conf:908)
                 alias www.[subdomain-name-A].[box-domain-name]
         port 8443 namevhost [subdomain-name-B].[box-domain-name] (/etc/apache2/conf/httpd.conf:995)
                 alias www.[subdomain-name-B].[box-domain-name]
         port 8443 namevhost [server-name] (/etc/apache2/conf/httpd.conf:1293)
[A.B.C].240:8080   [dedicated-domain-name-broken].[box-domain-name] (/etc/apache2/conf/httpd.conf:602)
[A.B.C].246:8080   [dedicated-domain-name-a].[box-domain-name] (/etc/apache2/conf/httpd.conf:746)
[A.B.C].246:8443   [dedicated-domain-name-a].[box-domain-name] (/etc/apache2/conf/httpd.conf:1169)
[A.B.C].245:8080   [dedicated-domain-name-b].[box-domain-name] (/etc/apache2/conf/httpd.conf:674)
[A.B.C].245:8443   [dedicated-domain-name-b].[box-domain-name] (/etc/apache2/conf/httpd.conf:1082)
*:*                    [server-name] (/etc/apache2/conf/httpd.conf:352)
*:8443                 [server-name] (/etc/apache2/conf/httpd.conf:1293)
Above [dedicated-domain-name-broken] is not showing an entry for the 8443 port, while all the [dedicated-domain-name-a/b] modified the same way 2 years ago are working correctly.

What is the cPanel way to fix this?

Thanks,
Michael

Box:
cPanel & WHM v102.0.18 (STANDARD)
CentOS 7.9.2009
Engintron Nginx

Already tried, didn’t help:
The new .db entry in /var/cpanel/userdata/[user] was missing several lines that existed in the working [dedicated-domain-name-a/b]. I manually added those and rebuilt/restarted Apache:

/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd
 

cPanelWilliam

Administrator
Staff member
Mar 13, 2018
169
28
153
Houston
cPanel Access Level
Root Administrator
Hello! Unfortunately, I don't believe there's currently a supported method for assigning a dedicated IP to an addon domain, although we do have an open feature request on this topic:

Can I add a dedicated IP address to an addon domain?

The best way to work around this would likely be to separate the addon domain into its own account using WHM > Convert Addon Domain to Account, then you could assign a dedicated IP to the new account.
 
  • Like
Reactions: cPRex