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?
Do you use any control panel to manage the domains on your server? Usually the serverip/~username works on cpanel based server.
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: