Web Hosting Talk







View Full Version : Two domains from single ip


Joblinger
01-02-2010, 06:16 PM
I'm am really confused about this setup.* I cant find anything online about this.* Currently I am running:

windows vista ultimate
apache 2.2
PHP
Perl
Filezilla

I have two websites that i want to have seprate domains running on my home server.
Example
hxxp://home.c0m
hxxp://crazy.c0m

i dont have a dedicated ip address but i have a DDNS setup in my router that updates automatically.* I cant access both webpages right now at: i.e. hxxp://hostname.c0m/home* * hxxp://hostname.c0m/crazy. but i want to setup a way to have the sites on thier own domain names.* Is this possible?* Do I need to setup a DNS server also?

Thanks in advance

VMhosts
01-02-2010, 06:45 PM
you need to setup virtual hosts within apache quick google search should bring up plenty of examples

Joblinger
01-02-2010, 07:05 PM
I'll look into that! Thank u for the very prompt response.

CanSpace
01-07-2010, 12:12 PM
I don't see how this would be possible without a dedicated IP address. The domain names themselves have to resolve to an IP address and your apache configuration has to be configured to listen on that IP address and deliver the site based on which host hame was requested by the client (using virtual hosts).

The only problem is if your ip address is always changing, this setup won't work. You could have your domains forward to your dynamic dns hostname, but then your web server wouldn't know which site to serve.

I think what you need to find is some dynamic dns provider that will work with your own domains...

VMhosts
01-07-2010, 12:14 PM
apache can bind (listen) to all IP's using * ?? I could be wrong though I am no apache expert

CanSpace
01-07-2010, 12:17 PM
It certainly can... but that doesn't help anything. He probably only has one IP address anyway.

VMhosts
01-07-2010, 12:19 PM
I have used multiple websites on the same server with tha single IP before, using the virtual hosts. I think I must not be understanding the question :)

VMhosts
01-07-2010, 12:26 PM
sorry I see what your saying now, he has a dynamic IP. Would this not work with a service susch as dyndns. Just cretae a record for each virtual host and use the dyndns name?

or once the client has resolved the name to IP would it just pass the orginal host header with the orginal domain name?

CanSpace
01-07-2010, 02:49 PM
The browser passes the hostname header, correct. But before that the requesting computer does an IP address lookup to get the ip of that hostname, then connects to that webserver.

The problem is how to get those domains to resolve to a dynamic ip address... there's no easy way to do that. Obviously people like dyndns have the technology.. but I don't know of anyone who offers a free service for this.

VMhosts
01-07-2010, 03:00 PM
Time to get a static ip