Questions Regarding Logins And Securing Them.

dwinans

Member
PartnerNOC
Jan 23, 2009
16
1
51
I have a few questions.

First, I have created a reseller.

I can login via http://servername:2086 without any issues. However, when attempting to login via http://resellerdomain.com/whm or :2086 it doesn't work. Not sure why this is.

Next, I'm looking to force secure logins to webmail, cpanel, whm etc... From my understanding users can get to Cpanel/WHM a variety of ways. The main 2ways look to be below.

domain.com/cpanel, domain.com/whm

With the above format I can see this is easily tweakable under "Tweak Settings" I've tried this and it works. Which is fine.

cpanel.domain.com, whm.domain.com

The idea is that when someone types in http://cpanel.domain.com/ they are automatically redirected to a secure connection. I would think this would be as easy as modifying the below 2 lines in the apache config, I tried the below modification and after the change it kicks back an internal server error. Yes, mod proxy and mod rewrite are enabled.

RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]

RewriteCond %{HTTP_HOST} ^whm\.
RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]

Changed To

RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteRule ^/(.*) https://127.0.0.1:2083/$1 [P]

RewriteCond %{HTTP_HOST} ^whm\.
RewriteRule ^/(.*) https://127.0.0.1:2087/$1 [P]

Last, any idea why WHM doesn't have this as an option by default? Seems to me this ought to be a fairly common request. Why pass login credentials over un-encrypted connections?
 
Last edited:

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
I have a few questions.

First, I have created a reseller.

I can login via http://servername:2086 without any issues. However, when attempting to login via http://resellerdomain.com/whm or :2086 it doesn't work. Not sure why this is.

Next, I'm looking to force secure logins to webmail, cpanel, whm etc... From my understanding users can get to Cpanel/WHM a variety of ways. The main 2ways look to be below.

domain.com/cpanel, domain.com/whm

With the above format I can see this is easily tweakable under "Tweak Settings" I've tried this and it works. Which is fine.

cpanel.domain.com, whm.domain.com

The idea is that when someone types in http://cpanel.domain.com/ they are automatically redirected to a secure connection. I would think this would be as easy as modifying the below 2 lines in the apache config, I tried the below modification and after the change it kicks back an internal server error. Yes, mod proxy and mod rewrite are enabled.

RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]

RewriteCond %{HTTP_HOST} ^whm\.
RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]

Changed To

RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteRule ^/(.*) https://127.0.0.1:2083/$1 [P]

RewriteCond %{HTTP_HOST} ^whm\.
RewriteRule ^/(.*) https://127.0.0.1:2087/$1 [P]

Last, any idea why WHM doesn't have this as an option by default? Seems to me this ought to be a fairly common request. Why pass login credentials over un-encrypted connections?
Currently https://cpanel.SERVER does not work (same for whm. and webmail.). Support for this will be included in 11.25, but I don't have an ETA on when 11.25 will become available. Internal Case 31935.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Try the reseller login using your own domain instead of the reseller's domain.

(It is possible the reseller's domain isn't pointing to your server yet)