Skip to content


Creating a Cpanel WHM add-on domain with dedicated ip address and ssl certifcate

I have recently been migrating a Magento site to a new server which uses cPanel/WHM. The Magento site is setup to run multiple stores off one installation, each of which runs on a separate domain.

Problem: By default cpanel doesn’t allow you to have a dedicated IP address for an addon domain. The reason why a dedicated IP address is needed is because each store requires an SSL certificate and SSL certificates can’t share an IP address.

Solution: You need to edit the addon domain apache config and change the IP address from the main site IP address to another IP address pointing to the server.

Process:
1. Create a new account in WHM

2. Go to Addon Domains in cPanel for that account

3. In my scenario the document root for the addon domain needs to be the same as the main domain because it is a multiple store Magento setup

4. Once the addon domain is created you need to edit the addon domain apache config:

vi /var/cpanel/userdata/mainaccount/addon.mainaccount.com

You need to change the ip from the main account IP to the addon domain IP: Eg: 192.168.0.2 => 192.168.0.3

documentroot: /home/mainaccount/public_html
group: mainaccount
hascgi: 1
homedir: /home/ mainaccount
ifmodulemodsuphpc:
group: mainaccount
ip: 192.168.0.3
no_cache_update: 0
phpopenbasedirprotect: 1
port: 80

5. Rebuild apache configuration: /usr/local/cpanel/bin/build_apache_conf

6. Restart apache

2 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Johnf408 said

    I gotta favorite this internet site it seems handy very useful cegeadebbkee

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.