lmaitland

Member
Aug 17, 2013
7
0
1
cPanel Access Level
Root Administrator
Hello everyone :),

I have an issue that im not to sure about.
After migrating to a VPC and installing cpanel i had originally set my servers host name as my domain name then changed it to the sub domain server.domain.com. I tried setting the SSL redirect to the hostnome via tweak settings - > redirection except this doesnt seem to be working.

My reason for this is that i have an SSL certificate for the domain server.domain.com and id like all my users to have a valid certificate when logging in so theres no nasty certifcate errors.

The certificate works when when viewing server.domain.com:2087 , but does not however work when navigating to domain.com/whm ( for the record domain.com is an account on my server ).

The redirection works for /cpanel though?

Thank you,
Lewis
 

GIANT_CRAB

Well-Known Member
Mar 23, 2012
89
0
56
cPanel Access Level
Root Administrator
Turn on "Always redirect to SSL" under tweak settings.
Set SSL redirect destination to "SSL Certificate Name".

Then it will always redirect you to SSL even if you're not on the SSL port.

>The certificate works when when viewing server.domain.com:2087 , but does not however work when navigating to domain.com/whm ( for the record domain.com is an account on my server ).

Yes, that's how SSL works.
Your SSL cert is registered on your server hostname so it is only valid when you visit it from your server's hostname.
 

lmaitland

Member
Aug 17, 2013
7
0
1
cPanel Access Level
Root Administrator
Yes the redirect works for for my user accounts and also my web mail etc for all user accounts.
Its only one redirect that doesnt work and its when im accessing domain.com/whm.
The /whm redirect works when doing it on user account domains?

It just seems to be this one domain it doesnt work for.
 

GIANT_CRAB

Well-Known Member
Mar 23, 2012
89
0
56
cPanel Access Level
Root Administrator
Yes the redirect works for for my user accounts and also my web mail etc for all user accounts.
Its only one redirect that doesnt work and its when im accessing domain.com/whm.
The /whm redirect works when doing it on user account domains?

It just seems to be this one domain it doesnt work for.
Yes, it will not redirect to SSL via /whm redirect.
This is because that user account doesn't have its own private SSL.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello :)

Are you accessing the /whm and /cpanel redirects with a secure URL from the start, or are you accessing those URLs with a non-secure URL and waiting for the redirect to the secure ports? Note that you may want to try rebuilding the Apache configuration file via:

Code:
/scripts/rebuildhttpdconf
Also, try clearing your browser cache to rule that out as the cause of this problem.

Thank you.
 

lmaitland

Member
Aug 17, 2013
7
0
1
cPanel Access Level
Root Administrator
Thanks for all the replies.

Im accessing via an unsecured http port 80 url.

As an example. I navigate to www.bytenet.co.uk -> then add /whm -> redirects to the secure :2087 port but throws the ssl certificate error 'certificate domain does not match current domain'.

However when navigating to www.bytenet.co.uk -> then adding /cpanel -> it redirects me to server.bytenet.co.uk:2087 ( the domain i have the certificate for ).

I have tried rebuilding my apache config file still no luck.

It should be added that when navigating to my users accounts then /whm it will redirect to my hostname with the correct certificate.

I have also tried from other computers but the issue persists.

Thank you for your help
 

GIANT_CRAB

Well-Known Member
Mar 23, 2012
89
0
56
cPanel Access Level
Root Administrator
As an example. I navigate to www.bytenet.co.uk -> then add /whm -> redirects to the secure :2087 port but throws the ssl certificate error 'certificate domain does not match current domain'.
Type in https://www.bytenet.co.uk/whm

And it will redirect you to https://server.bytenet.co.uk:2087

However when navigating to www.bytenet.co.uk -> then adding /cpanel -> it redirects me to server.bytenet.co.uk:2087 ( the domain i have the certificate for ).
No, that should not be happening.
It should be redirecting you to port 2083.

Type in https://www.bytenet.co.uk/cpanel

And it will redirect you to https://server.bytenet.co.uk:2083
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
It sounds like there is a browser cache issue here. Have you tried with a different web browser? The URLs you provided both correctly redirect me to a valid SSL certificate that is signed.

Thank you.