[Xitami] Xitami and Windows NT - how do I name ???
Paul Reid
xitami@lists.xitami.org
Wed, 17 Oct 2001 16:00:16 -0400
> The cart program asks for two main items of information - the "document root" which is simply the path to where it lives - c:\xitami\cgi-bin\cart.cgi - and the "domain name" - which, is where on a unix server at my ISP would be something like www.smart-choices.org (which really does exist, and where the cart programs are located), but I'm not sure what that value needs to be on my local system.
"domain name" of "localhost" should work. Same as you should be using to
open the web pages that call your scripts.
If you prefer to see a "normal looking" URL like "snoo.com" in your
scripts, edit your "hosts" file like this:
127.0.0.1 localhost
127.0.0.1 ads.x10.com #damn spam
127.0.0.1 snoo.com # for testing cart program
(Some Windows distributions come with no "hosts", just "hosts.sam". Copy
it to the right name, re-start your browser or maybe Windows.)
The first line is why "localhost" resolves to "this machine", and is
normally preset in "hosts". (The second line is my trick to foil a
specific pop-up ad server-- ignore it.) The third line say that all
calls to "snoo.com" should go to the local machine.
If there is a real "snoo.com" (or whatever test-name you use), this will
of course prevent you from reaching them. You could in fact use your
real name "127.0.0.1 www.smart-choices.org" for testing from your local
machine, and comment it out (leading "#") when you want to test from the
real machine. Changes in "hosts" -may- work immediately, or with full
browser re-start. In the past, on WinNT4, I could keep hosts open,
change things, and see results in Netscape instantly.
One issue: some versions of Windows will insist on connecting to an
external DNS server even to resolve names set locally in the "hosts"
file. If you are on-line, not a problem, but if you work on a laptop at
the beach it can be frustrating when it tries to dial-out just to "find
itself".
Disclaimer: MicroSoft never understood TCP/IP or DNS well, so your
results may vary depending on Windows version, service pack, browser
version, and moon-phase.
-PRR