Forward domain/cpanel to cpanel.domain/

Shane3673

Well-Known Member
Dec 20, 2013
96
1
8
cPanel Access Level
Root Administrator
I have look everywhere to see if you can do this, but it seems most people want to do the opposite. I have a wildcard SSL cert installed for the main domain and all services. Currently for all of the other domains I created subdomains for cpanel and webmail that forward to the main domain. Ex.

cpanel.domain2.com forwards to cpanel.domain.com

This forces users to login to use the main domains login in order to use the wildcard cert and then they don't get the untrusted site error. This works great.

If I use www.domain.com/cpanel, I don't get a error because the wildcard cert, but if I use www.domain2.com/cpanel I get the error because the cert is not for that domain. If I can forward www.domain2.com/cpanel to either cpanel.domain.com or www.domain.com/cpanel it will work with the cert. I have tried to setup a standard forwarder both ways but it does not work. It loads the service before the forwarder can forward it.

Is it possible to forward www.domain2.com/cpanel to cpanel.domain.com?
 

Shane3673

Well-Known Member
Dec 20, 2013
96
1
8
cPanel Access Level
Root Administrator
Re: Forward www.domain.com/cpanel to cpanel.domain.com

This is the one that helped me:

http://forums.cpanel.net/f5/preserving-httpd-conf-changes-125733.html

CPKenneth's answer

After this it still would not redirect using the redirect in cpanel (shows blank webmail folder) for some reason.
Created a redirect page with this code only <meta http-equiv="refresh" content="0; URL=http://webmail.domain.com">
Named it index.html
Dropped it into the www/webmail folder for each domain including the main one
Now www.everydomain.com/webmail goes to webmail.domain.com and can use the SSL cert for that domain without an untrusted error