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!

forward domains to a differenet ip address and different port?

Discussion in 'General Discussion' started by b0072k1, Nov 27, 2005.

  1. b0072k1

    b0072k1 Well-Known Member

    Joined:
    Dec 30, 2004
    Messages:
    132
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Glasgow
    Hi, Im just wondering how can i set up a subdomain set up on my server to connect to a remote computer to a certain port to allow people to connect to this port to access a certain system?

    Any way this can be done at all?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    544
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    ?cPanel dont think would support it - but here is a work around.

    what are you trying to do exactly

    take

    www.domain.com/directory or http://subdomain.domain.com

    and then forward that to www.anotherdomain.com:port#

    the easiest way to do this is to create an index.php file under the domains default directory (or the sub domains default www directory and place the following into it -


    Code:
    
    <?php
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: '.$url);
    
    exit;
    ?>
        
    
    

    in the above you would place http://anotherdomain.com:port# in place of the url -

    ie http://1.1.1.1:2086 (yes you can even use ip addresses

    via dns - not 100% sure that cPanel bind would support it...

    Hope this helps.
     
    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