Assign Dedicated IP Addresses to Subdomains - Is not working!

allhost

Member
Dec 22, 2014
14
0
1
cPanel Access Level
Root Administrator
Hello All,

I just followed this documentation at cPanel to the letter, tried it twice, but I never managed to get it to work.

How to Assign Dedicated IP Addresses to Subdomains

I have a domain and I wish to assign it a dedicated IP. The domain is added as an addon to a cPanel account, then, I followed the steps in this cPanel documentation, but It failed to work. Though once I ping/host ..etc, the IP is picked correctly, DNS is correctly setup, but, it is not picking the right sub-folder under that cPanel it is hosted under, so no page is shown. It keeps showing the standard cPanel yellow error message. Of course, I rebuilt and restarted apache, with no luck.

Is there any step missing in that documentation? It should be straight forward.

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello :)

Please open a support ticket using the link in my signature if you followed the steps in that documentation. You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

Kieron Thomas

Registered
Jan 13, 2016
2
0
1
Brighton
cPanel Access Level
Root Administrator
Hi Michael,

I have found the issue, there is a mistake in the documentation - rebuilding and restarting Apache through the WHM does not add the new IP to the vhosts. Only rebuilding and restarting in the terminal does. Hence, the either or for the below is incorrect - do not trust CPanel in this use the terminal!

Step 2: Rebuild and restart Apache
After you modify the appropriate files, rebuild and restart Apache. To do this, perform either of the following actions:

  • Manually rebuild and restart Apache. To do this, run the following commands:

    1/usr/local/cpanel/scripts/rebuildhttpdconf
    2/usr/local/cpanel/scripts/restartsrv_apache
  • Rebuild and restart Apache in WHM's Restart Services interface (Home >> Services >> Restart Services).
Kind regards,
Kieron
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Keep in mind that restarting Apache through Web Host Manager does not rebuild the Apache configuration file. You must utilize an option such as this if you want to do that via Web Host Manager:

"WHM Home » Service Configuration » Apache Configuration » Global Configuration"

Thank you.