1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Setting up home server to host domains

Discussion in 'Apache' started by DLM3, Jan 21, 2010.

  1. #1
    I have recently purchased a home server (Synology DS209+II) and I want to host my domain and my friends on it. I setup the webstation and I am able to direct my domain to the server. One problem I ran into is my friends, on my domain I added a new DNS to point to my ip (21.XXX.XX.XXX). My friends DNS should be (21.XXX.XX.XXX/~friend) but I am unable to do that within dns since it does not allow "/~". How would I be able to direct my friends domain to my server?
     
    DLM3, Jan 21, 2010 IP
  2. hostechsupport

    hostechsupport Well-Known Member

    Messages:
    413
    Likes Received:
    23
    Best Answers:
    7
    Trophy Points:
    138
    #2
    Do you use any control panel to manage the domains on your server? Usually the serverip/~username works on cpanel based server.
     
    hostechsupport, Jan 22, 2010 IP
  3. segzeey

    segzeey Active Member

    Messages:
    350
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    78
    #3
    You have to point your friends domain to that same DNS and configure your server to handle it.
     
    segzeey, Jan 22, 2010 IP
  4. DLM3

    DLM3 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It uses a cpanel type management running apache version 2.2.13. So I can configure it findout which domain name it is forwarding from and direct it to his folder?

    Something like this:?

    <?php
    IF ($_SERVER["SERVER_NAME"]=="www.user1.com"){
       header('Location: /~username1');
    }
    ELSE {
    IF ($_SERVER["SERVER_NAME"]=="www.user2.com"){
       header('Location: /~username2');
    }
    ELSE {
       echo "This is the end of the internet";
    }
    }
    ?>
    PHP:
     
    DLM3, Jan 22, 2010 IP