Page 1 of 1

2 or more domains on 1 ip with 2 or more sites

PostPosted: 04. January 2005 01:37
by anrkey
Hi

I want to put 2 or more sites up on my XAMPP server (Linux)
so...
1: I have up to 3 ip's that I could use.
2: I want to have 2 or more domains pointing to my server and then each going to it's site folder. ex www.domain1.com >> htdocs/dom1 and www.domain2.com >> htdocs/dom2.
3: I do not want the client to see that I am using subdirectories.
4: I want to set up a seperate FTP dir that is all that can be accessed for each domain.

So does anyone know what I should be reading cause google is just not comming up with much for me...

I am finding this hard to explain but hopefully u understand. If you need more info I will update you... Any help would be really cool.

Thanks for a KICKASS package XAMPP team!

Kind Regards
AnRkey

PostPosted: 04. January 2005 15:08
by mobious
this should work..

First you need to register the Domain Names you want to use..

Next you need a DNS server.. There are free ones out there. I use http://freedns.afraid.org/domain/

Create an account on your DNS server. Then on your domain name registar's website point your domain names to the Name Servers of your DNS server. You will point them both to the same NS servers..

Now go back to your DNS provider and set up the MX record. You will have 2 listings. On your first you will set it up like this..
www.your1stdomainname.com ==> your.ip.address/1stfolder
Then your second
www.your2nddomainmane.com ==> your.ip.address/2ndfolder

That should work..

If it doesnt and you still want to host 2 websites on one box you might need to have 2 NICs in your box and assign them each a different internet ip address. Then configure your OS so that 1 nic handles 1 website and the other the second..

Hmmm...

PostPosted: 05. January 2005 01:58
by anrkey
The domains are done by dyndns.org and I already have every1 using them...
OK I have 1 nic that I can use. So the 2 nic idea is out for me :(
dyndns.org also does MX records. What are MX records and how can they help me?

Thanks for the help so far
AnRkey

I just had an idea...

PostPosted: 05. January 2005 02:03
by anrkey
I was thinking. I know that u can give a nic 2 ip address' how would I set xampp up to use a different IP for each folder on my xampp server.

IP1 >> htdocs/dir1
IP2 >> htdocs/dir2

That way all i would need to do is set up another domain. I think this is the easiest way. What you think?

BTW: I have the FTP side of things sorted out now...

Thanks
AnRkey

Me again...

PostPosted: 05. January 2005 02:18
by anrkey
OK I now have 2 domains on 1 IP. Working fine. Now all I want is for XAMPP to see which domain the request is comming from and send it to the correct subfolder in the htdocs dir. Any idea where to set this?

Cheers
AnRkey

PostPosted: 05. January 2005 13:03
by Kristian Marcroft
Hi,

try searching for VHosts or VirtualHosts
Thats what you want...

So long
KriS

Thanks

PostPosted: 05. January 2005 17:54
by anrkey
Thanks will look into it and update the forum as to what happens. I am sure every1 else could use this...