The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/whm/ anyone know how todo?

Discussion in 'General Discussion' started by idn, Apr 6, 2002.

  1. idn

    idn Well-Known Member

    Joined:
    Aug 18, 2001
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    well, /cpanel/ cloaks 2082, is it possible to have /whm/ cloak 2086 ? i saw one host do this,

    just curious how

    sean
     
  2. awsol

    awsol cPanel Test Bitch

    Joined:
    Feb 8, 2002
    Messages:
    591
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Boston MA
    Just make whm a redirect to domain:2086
     
  3. idn

    idn Well-Known Member

    Joined:
    Aug 18, 2001
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    for anyone interestd, here is how i did it:

    1) make a file called &whmredirect.cgi&

    code it with this:

    ==============

    #!/usr/bin/perl

    if ($port eq &&) { $port = '2086'; }

    if ($ENV{'HTTP_HOST'} ne &&) {
    print &Location: http://$ENV{'HTTP_HOST'}:${port}\n\n&;
    exit;
    }

    print &Location: http://$ENV{'REMOTE_ADDR'}:${port}\n\n&;


    ===============

    Save it, and move it to /usr/local/cpanel/base
    Make it a 755 file. (chmod it to 755)

    Then, edit httpd.conf, and add this anywhere, preferably after the other script aliases:

    =====
    ScriptAlias /whm /usr/local/cpanel/base/whmredirect.cgi
    =====

    Thats it, restart HTTPD, and you are all set....... I just find it easier, you can just punch up domain.com/whm instead of having to HAVE to put http://domain.com:2086 - its not a huge diff. but it works........ and could be helpful

    sean
     
  4. DHL

    DHL Well-Known Member

    Joined:
    Mar 8, 2002
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Nice tip,

    Thanks

    Steve
     
Loading...

Share This Page