Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Redirect whm/cpanel users to hostname

Discussion in 'Bind/DNS/Nameserver' started by rappie, Nov 6, 2016.

Tags:
  1. rappie

    rappie Member

    Joined:
    Oct 4, 2008
    Messages:
    16
    Likes Received:
    2
    Trophy Points:
    53
    Location:
    Amsterdam
    Hi,

    How can I configure that users who try to access WHM or cPanel trough the server IP (on either http or https) will be redirected to the hostname of the server?

    So if users tries to logon to WHM on 199.xx.xx.200:2087 I'd like them to be forwarded to server010.example.com. Same for cPanel.
     
    #1 rappie, Nov 6, 2016
    Last edited by a moderator: Nov 6, 2016
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    604
    Likes Received:
    42
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. danielpmc

    danielpmc Well-Known Member

    Joined:
    Nov 3, 2016
    Messages:
    64
    Likes Received:
    30
    Trophy Points:
    18
    Location:
    Gainesville, Florida
    cPanel Access Level:
    Reseller Owner
    Hello rappie,

    You said:
    So if users tries to logon to WHM on 199.xx.xx.200:2087 I'd like them to be forwarded to server010.example.com. Same for cPanel.

    Most individuals that allow others to access their server either as an admin, reseller or client will one day face your issue. But it is not an easy fix, unfortunately. Reason being, many internal and external system services are assigned to the IP address only. Some will not send/receive if they are redirected in any way for security reasons. Another reason is that you could potentially create a loop in your server by system services entering/exiting your server since they use fixed pre-assigned urls with the servers IP.

    I suggest researching online and see if it is poosible to create a redirect in your Apache httpd file. Make sure to create a backup of the entire httpd file BEFORE editing.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    rappie likes this.
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,699
    Likes Received:
    1,790
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    There are no options available to automatically redirect users who utilize the specific port numbers in the URL. The options under the "Redirection" tab in "WHM >> Tweak Settings" are available to redirect users to the SSL/TLS ports when visiting /cpanel, /webmail, /whm, etc.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice