Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have one server running WHM/CPanel with quite a few (~60) low traffic sites we can't be bothered to put on a proper hosting platform.

CPanel is accessible on every domain at http://example.com/cpanel, however this redirects to http://servers-fqdn:2083/. I've worked on other CPanel servers where the /cpanel link redirects to http://example.com:2083/ so each CPanel is running under its own domain but I couldn't seem to find any documentation on how to get this to work.

Two reasons this would be useful;

  1. I frequently access the CPanel sites, but because they all redirect to the servers main hostname (and CPanel uses HTTP authentication) I can only save one username/password combination, having it on different domains would let me save each username/password individually.
  2. I would look better when our actual users log on, since the servers primary (FQDN) is reeaaallllly long

So yeah this is more for convenience than anything practical but still.

Short form;

Lots of sites with CPanel but when accessing it

http://example1.com/cpanel redirects to http://server-fqdn:2083/
http://example2.com/cpanel redirects to http://server-fqdn:2083/
[etc]

we want

http://example1.com/cpanel redirects to http://example1.com:2083/
http://example2.com/cpanel redirects to http://example2.com:2083/

Full root access to the server (I'm a real sysadmin, but users like CPanel), WHM version WHM 11.30.5, RedHat Enterprise Linux 5.5

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The reason why it redirects to the server hostname is so that you only have to get one SSL certificate. It is recommended to keep it at the hostname and force SSL.

That said to make it so that you can have it the way you wanted.

Login to WHM > Tweak Settings > Redirection

  • Always redirect to SSL = OFF
  • Non-SSL redirect destination = Origin Domain Name
  • SSL redirect destination = SSL Certificate Name
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.