
|
View Full Version : IP and Host Headers(windows)
seattlite 01-28-2002, 06:30 PM Hello,
Does anyone know of a way to specify a multiple sites on one IP? This is without actually specifying domain1.com as a host header.
Perhaps the scenario will spell it out better. How can you give someone instant access to their site(http) before DNS kicks in?
I would like to do something like 123.123.123.123/domain1 if possible and have it forward to the correct site, and when DNS finally kicks in domain1.com will be accessable...
Anyone know a way to work something like this?
allan 01-28-2002, 08:30 PM Wouldn't it make more sense to set the TTL for your domain very low, create a temporary domain for them to use, and add that domain as a ServerAlias in Apache?
e.g.:
Your domain: example.com
Customer domain: domain.com
Customer signs up, you set their site up as usual and send them an e-mail saying they can temporarily use:
domain.example.com
to access their site while they are waiting for DNS to propagate?
If not, there is probably a way you can do this with mod_rewrite: http://httpd.apache.org/docs/misc/rewriteguide.html. I have never tried to, but it would seem to do what you want.
seattlite 01-28-2002, 09:18 PM Thanks for the post and it has given me an idea on how to manage this(although I wish there was a slightly easier way). I suppose I should have explained the situation better.
Im actually looking to do this with Windows IIS and DNS.
The newdomain.mydomain.com idea could work... I just have to work around the "pain" of constantly deleting the new A records a few days after normal DNS propogates.
I guess to me the ideal situation would be to avoid having to make additional DNS changes so I would have something like 123.123.123.123/domain1 which I could leave up for the life of the account and not worry about. With the current idea, if DNS wasn't managed afterwards the amound of A records for mydomain.com would become quite large...
allan 01-29-2002, 01:45 AM sorry about that, I complete spaced on the IIS thing. I am sure the same sort of functionality exists in IIS, I am just not as famliair with it as I am with Apache, so I don't want to steer you wrong.
ASPCode.net 01-29-2002, 03:38 AM I use the temporary subdomain solution and yes, while it could be a pain to constantly delete the new A records, I simple don't do it. Doesn't matter if there are extra records to me.
As I am a developer myself I have thought of writing my own ISAPI filter using C++ for an automatic solution without any DNS records but never had the time or cared that much about it.
seattlite 01-29-2002, 04:11 AM Hey stefan,
Couple of questions for you, are you using Windows DNS and do you know of any performance drawbacks of having extra records?
Thanks
ASPCode.net 01-29-2002, 05:18 AM Windows DNS? yes and no. For my users regular domains I use Windows DNS, but actually for all my temporary subdomains url I have a Linux based DNS server.
For no real reason, just happened to be so that I had that domains NS on that machine. I would really not hesitate to use Windows DNS for all subdomains as well, cause I can't think of any real performance drawback. A 'A' record is not many bytes long and although DNS is a sort of textbased database, I bet the whole DNS is held in RAM and swapped out when needed as any memory.
RackMy.com 01-29-2002, 10:23 AM You could do it both ways, but doing subdomains is a lot easier. What you can do is set-up a temporary domain, say iistesting.com. Then when you have a new client, set-up the A record of customer1.iistesting.com and then add it to the host header info in IIS. Then, with a simple script (I can help you with), you can delete the A records after a certain amount of time (say 2 weeks). This way it's automatic and will not fill up your DNS with unneeded records.
Make sense?
wallaby 01-29-2002, 12:57 PM You can do it with a virtual directory, so you have something like:
yoursite.com/customername
the downside to this is that some scripts and CGI applications will not work, as they get confused about what path (directory) is applicable.
Do subdomains suffer from the same problem?
The ISAPI filter looks interesting... Could play around a little with Delphi, I have some boilerplate Delphi code for an ISAPI filter somewhere. Anyone know if this will overcome the "path" problem with CGI apps?
seattlite 01-29-2002, 03:26 PM Rackmy,
Thanks for the clarification, I will PM you...
|