CPanel -> Addon Domains -> Choose IPs?

daiverman

Registered
Jul 2, 2007
4
0
51
I just move from Plesk to CPanel.

Using WHM, I created an account named "test.com" and it is tied to IP address xxx.xxx.xx.35. I went into "test.com" CPanel and added on a domain "test2.com".

I want test2.com to have an IP address of xxx.xxx.xx.36.

How can I manage this? Is the only solution to create a separate account in WHM for test2.com?

Thanks!
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
I just move from Plesk to CPanel.

Using WHM, I created an account named "test.com" and it is tied to IP address xxx.xxx.xx.35. I went into "test.com" CPanel and added on a domain "test2.com".

I want test2.com to have an IP address of xxx.xxx.xx.36.

How can I manage this? Is the only solution to create a separate account in WHM for test2.com?

Thanks!
We don't support having multiple domains on multiple IP Addresses with a single account. We only support a single IP Address per account. Hence to do what you are requesting, at this time, requires setting up each domain as its own account.

There are various hackish ways around this, but will likely cause headaches in the long term such modifications will be unsupported.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
15
313
Houston, TX
cPanel Access Level
Root Administrator
Has this been changed yet? is there a way to set a dedicated IP to a sub or addon domain?
A single cPanel account can only have 1 dedicated IP address. However, if you create the subdomain and add-on domain as separate cPanel accounts, you could issue those a dedicated IP address as well (since they're separate cPanel accounts).
 

Sindre

Well-Known Member
Aug 25, 2008
46
0
56
Are there any plans to introduce this in the (near) future? In my opinion, it is the one thing which leaves cPanel behind some other control panels. With the current situation, it is not possible to install an SSL certificate for more than one domain in an account. Additionally, I would suggest that you add support for true multi-domain hosting (not just addon domains).

I believe these features have been requested for a long time by many people. It should not be that hard to implement, but it would make a huge difference.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
15
313
Houston, TX
cPanel Access Level
Root Administrator
Are there any plans to introduce this in the (near) future? In my opinion, it is the one thing which leaves cPanel behind some other control panels. With the current situation, it is not possible to install an SSL certificate for more than one domain in an account. Additionally, I would suggest that you add support for true multi-domain hosting (not just addon domains).

I believe these features have been requested for a long time by many people. It should not be that hard to implement, but it would make a huge difference.
I am not aware of any near-term plans for implementing this (e.g. 11.25 or 11.26). However, that doesn't mean it's off-limits for incorporation into cPanel/WHM, just that it may be a while before we see this functionality.

You mention "true" multi-domain hosting. In cPanel 11, an addon domain doesn't need to reside in a subdirectory of the primary domain's website anymore, so you can have multiple websites that are separate from one another yet under the same cPanel account. In addition to the SSL issue, is there anything specific you are looking for?
 

Sindre

Well-Known Member
Aug 25, 2008
46
0
56
I am not aware of any near-term plans for implementing this (e.g. 11.25 or 11.26). However, that doesn't mean it's off-limits for incorporation into cPanel/WHM, just that it may be a while before we see this functionality.

You mention "true" multi-domain hosting. In cPanel 11, an addon domain doesn't need to reside in a subdirectory of the primary domain's website anymore, so you can have multiple websites that are separate from one another yet under the same cPanel account. In addition to the SSL issue, is there anything specific you are looking for?
Hi David,

Thanks for the reply.

I know you can specify a document root outside of the public_html for new addon domains, however, the way cPanel handles addon domains internally is like a "hacked" subdomain solution. Let me explain what I mean by "true" multi-domain hosting.

Lets say I have an cPanel account with the main domain "domain1.com". Then I want to add a second domain "domain2.com". This generates a subdomain domain2.domain1.com, and the domain2.com is just set up as a ServerAlias. Why not just create a vhost entry for domain2.com, keeping it totally separate from domain1.com? I am really confused why you implemented it this way in the first place.

In fact, I don't think there should be such thing as a "main domain". All domains should be treated equally, with the possibility to assign each one a specific IP address. I also suggest that you move away from the single "public_html" directory. Why not use one directory "domains", which every domain's web root is stored under:

home_dir/domains/domain1.com/
home_dir/domains/domain2.com/

Possibly, with a public_html/www directory under each domain folder.

I hope that in a future version, you will abandon the whole "addon domains" concept, and replace it with a section "Domains". You should also make it possible to change the document root of a domain.

I think the changes I have described above would make cPanel an even better control panel. The lack of proper multi-domain support is the top reason most of our clients hesitate to use cPanel.

I understand these enhancements would require some major changes to the core system and it is not something I expect to see in the next release, but I hope it can be put a bit higher on the priority list.
 

zealus.com

Registered
Jun 2, 2006
4
0
151
I absolutely agree with the above post. We have just hit the same roadblock with one of our clients who's hosted on WHM/cPanel servers, but there are no reseller accounts offered. In fact, our client doesn't even need reseller privileges for a single sake of having 2 web sites with separate SSL certs.

However, instead of
home_dir/domains/domain1.com/
home_dir/domains/domain2.com/
I'd rather see:

home_dir/domain1.com/www
or
home_dir/domain1.com/public_html

which would make perfect sense.
 

thewebhosting

Well-Known Member
May 9, 2008
1,199
1
68
A single cPanel account can only have 1 dedicated IP address. However, if you create the subdomain and add-on domain as separate cPanel accounts, you could issue those a dedicated IP address as well (since they're separate cPanel accounts).
What if someone want to install SSL certificate on an addon domain? Since SSL certificate can only be installed on a dedicated IP address.

Will it not be possible?
 

chinmay

Well-Known Member
Jul 22, 2008
101
0
66
localhost
What if someone want to install SSL certificate on an addon domain? Since SSL certificate can only be installed on a dedicated IP address.

Will it not be possible?
It is possible to install SSL certificate on the Addon domain :) You can assign dedicated Ip for the Addon domain and proceed with the SSL installation on the Addon domain..
 

Sindre

Well-Known Member
Aug 25, 2008
46
0
56
It is possible to install SSL certificate on the Addon domain :) You can assign dedicated Ip for the Addon domain and proceed with the SSL installation on the Addon domain..
Not if an SSL already is installed on the main domain, as they share the same (dedicated) IP.

I have found a workaround for this problem, but it requires manual configuration. It is possible to edit the IP of the vhost template in /var/cpanel/userdata/... Only 1 line needs to be changed. cPanel could quite easily implement this fix if they wanted to.
 

gkgcpanel

Well-Known Member
Jun 6, 2007
214
1
166
cPanel Access Level
DataCenter Provider
Please explain your work around...

Not if an SSL already is installed on the main domain, as they share the same (dedicated) IP.

I have found a workaround for this problem, but it requires manual configuration. It is possible to edit the IP of the vhost template in /var/cpanel/userdata/... Only 1 line needs to be changed. cPanel could quite easily implement this fix if they wanted to.
What line needs to be changed? Please explain the work around.
 

Sindre

Well-Known Member
Aug 25, 2008
46
0
56
What line needs to be changed? Please explain the work around.
Open the vhost template corresponding to your domain/addon domain in /var/cpanel/userdata/%username%/%domain_name%.

Locate the line with the IP address, and change it to a dedicated IP.

Run /scripts/rebuildhttpdconf to rebuild the Apache config, and then restart Apache for the changes to take effect.

You will now be able to install an SSL certificate on both the main domain and the addon domain.
 

Nick285

Registered
Apr 17, 2011
3
0
51
Hi David,

Thanks for the reply.

I know you can specify a document root outside of the public_html for new addon domains, however, the way cPanel handles addon domains internally is like a "hacked" subdomain solution. Let me explain what I mean by "true" multi-domain hosting.

Lets say I have an cPanel account with the main domain "domain1.com". Then I want to add a second domain "domain2.com". This generates a subdomain domain2.domain1.com, and the domain2.com is just set up as a ServerAlias. Why not just create a vhost entry for domain2.com, keeping it totally separate from domain1.com? I am really confused why you implemented it this way in the first place.

In fact, I don't think there should be such thing as a "main domain". All domains should be treated equally, with the possibility to assign each one a specific IP address. I also suggest that you move away from the single "public_html" directory. Why not use one directory "domains", which every domain's web root is stored under:

home_dir/domains/domain1.com/
home_dir/domains/domain2.com/

Possibly, with a public_html/www directory under each domain folder.

I hope that in a future version, you will abandon the whole "addon domains" concept, and replace it with a section "Domains". You should also make it possible to change the document root of a domain.

I think the changes I have described above would make cPanel an even better control panel. The lack of proper multi-domain support is the top reason most of our clients hesitate to use cPanel.

I understand these enhancements would require some major changes to the core system and it is not something I expect to see in the next release, but I hope it can be put a bit higher on the priority list.
I cant believe that after 2 years this hasn't been implemented. I've just moved to a cPanel host which I thought would be more powerful and an improvement on my old hosts admin panel but the fact I cant even change the Document Root of ANY domain (sub/addon/main) without deleting it and readding it (and having to reconfigure all the email accounts and settings etc as a result) its quite frankly ridiculous! Under my old host all domains were just listed in the 'domains' section, none of this main domain stuff with subdomains for every addon, what a bizarre and messy way of doing things!
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
15
313
Houston, TX
cPanel Access Level
Root Administrator
I cant believe that after 2 years this hasn't been implemented. I've just moved to a cPanel host which I thought would be more powerful and an improvement on my old hosts admin panel but the fact I cant even change the Document Root of ANY domain (sub/addon/main) without deleting it and readding it (and having to reconfigure all the email accounts and settings etc as a result) its quite frankly ridiculous! Under my old host all domains were just listed in the 'domains' section, none of this main domain stuff with subdomains for every addon, what a bizarre and messy way of doing things!
Your hosting provider can simply change the main domain associated with your account, no removal of data or settings is needed for that.

Admittedly, for addon and subdomains, short of manually editing httpd.conf (which your hosting provider would need to do), deleting/re-adding is the only way to change directory roots via the cPanel UI
.
Regarding progress of moving away from the current system towards a more generic system like the one you mentioned, you can monitor the following feature request thread: http://forums.cpanel.net/f145/case-...ple-ssl-certificates-ips-per-acct-138917.html