Subdomain point to another cPanel server

Jan 29, 2018
6
1
3
Brazil
cPanel Access Level
DataCenter Provider
Hi guys,

I'm having some issues trying to setup a subdomain from a cPanel server to another cPanel server with different ip's.

Example:
My domain example.com its hosted on a hosting provider, i need that a subdomain of this domain point to another cPanel server.

example.com -> cPanel Server
server2.example.com -> Other cPanel Server

I already create the account server2.example.com on the other server, when i access the subdomain, im redirected to the cgi-sys/defaultwebpage.cgi, when i try the same url with the https he accepts and redirect to the "Index Of" i need that the http go for the "Index Of" as the same of https.

Can someone give me a help?
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

Rather than creating a new account for the subdomain, you should instead simply add an "A" record for it in the existing DNS zone of "example.com" using "WHM >> Edit DNS Zone". Ensure the "A" record points to the IP address of the server you want it to resolve to.

Thank you.
 
Jan 29, 2018
6
1
3
Brazil
cPanel Access Level
DataCenter Provider
Hey Michael, thanks for the answer.

I already did that, created an A record on the cPanel where the example.com its hosted pointing to the ip of the other cPanel its located.

In the other cPanel i created the cPanel account of server2.example.com, i waited to the dns propagation and clean all of the cache of my browser. Stays the same...

With the https he open normally and go to the 'Index Of', without the https he redirect to the cgi-sys/defaultwebpage.cgi.



Any other idea?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

Are you using any custom entries in the .htaccess within the document root of the website? Does it help if you rebuild the Apache configuration file via the /scripts/rebuildhttpdconf command?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

Feel free to open a support ticket using the link in my signature so we can take a closer look.

Thank you.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
3,236
401
243
cPanel Access Level
Root Administrator
@Nazmul Hassan Masum - since this thread is over two years old it's usually best to start a new one. If you need to point a subdomain to a different IP address than the main cPanel account, it's best to just adjust the DNS. If you'd like to make a new thread with additional details on your specific issue I'll see that and help out!