I'm trying to test a server setup of two sites (firstserver.org and secondserver.org) on a development box in an internal network with unrouteable ip addresses. Neither of these domain names is real, but I resolve them with appropriate entries in /etc/hosts with /etc/host.conf and /etc/nsswitch.conf set to resolve locally with files before dns. (I'm using DNS from the ISP, not running it locally--in case that matters.)
I've installed and patched AOLServer 3.3ad13 and I've amended the stock nsd.tcl file for each server only by editing the various items pointed out in Jerry's document. AOLServer serves pages from either site when I start either one alone via nssock. I thus know that AOLServer works and the name resolution works. When I set up the third master server (running nsvhr) and start the two "slave" processes (using the nsunix module instead of the nssock module), it *appears* that the three processes seem to work (though they don't):
- I see the appropriate firstserver.nsunix and secondserver.nsunix socket files in /usr/local/aolserver/modules/nsunix.
- In standard out during the master server startup, I see notices that nsvhr is redirecting each of the mapped domains to the appropriate nsunix socket file.
- However, earlier in the startup process for each slave server, I see in standard out: "Warning: nsunix: missing Location and Port parameters". (However, I do have the default port 8000 set in each case.)
- Nevertheless, later on in standard out during each slave server startup, I can see "Notice: nsunix: DrvStart starting: listenSocket = 12, modules/nsunix/firstserver.nsunix" for one and "Notice: nsunix: DrvStart starting: listenSocket = 12, modules/nsunix/firstserver.nsunix" for the other (suggesting that some default has kicked in to provide the missing Location and Port parameters??) However, both slave servers appear to have been given somehow the same listenSocket (=12) (Is this correct; seems unlikely.)
- One other confusing clue is that I don't see separate server.log files in /usr/local/aolserver/log/ even if I include a path in the ns_section "ns/parameters" section. In fact, no logs are getting written by any of the servers. What can this mean?
- Are there additional parameters I'm supposed to give the
nsunix
module in each of the slave server's startup .tcl files (I'm using
separate "nsd.tcl" files for each of the three servers.)? I'm just
using the ones Jerry indicates:
ns_section "ns/server/${servername}/module/nsunix" ns_param hostname www.firstserver.org ns_param socketfile firstserver.nsunix - Is this some problem with how I'm trying to dodge DNS by using /etc/hosts in this manner? How do the rest of you handle this when working on sites on development boxes that you then mirror up to your real servers? To date I've done all my development on the live site, but this obviously isn't a good long-term approach.
- What else am I'm missing?
- Would someone be willing to post their "nsd.tcl" files if they've set them up separately for the master server and slave servers? Many thanks for any pointers!
Anyway, when I then try to hit either slave server with a browser on the same server box, I get the error "Netscape's network connection was refused by the server www.firstserver.org:8000. The server may not be accepting connections or may be busy."
If this is a simple config problem, I can't spot it after staring at things for a long time. So here are my questions:
Stan
Request notifications