Forum OpenACS Q&A: Response to script to modify the hostname and address in nsd.tcl

Ah, I'm not sure why you would want to use [ns_info address] in your nsd.tcl config file. I admit I haven't tried doing it that way myself, but nsd.tcl is where ns_info gets its configuration information, so I don't see the sense of using that command there. If it does work at all, I'd suspect that must mean you're essentially telling AOLserver to use some sort of default value for the IP address and port to bind to. And hopefully AOLserver gets that default IP address by asking the OS what the IP address is for the eth0 interface or something like that. But I've never tried it or looked at the code to see what it actually does.

I've always simply directly specified the IP address info in my nsd.tcl, something like this:

set  ip_address(dev)  {192.168.1.20}
set        port(dev)  9876

ns_section ns/server/$server_name($which)/module/nssock

  ns_param timeout   120
  ns_param Address   $ip_address($which)
  ns_param Hostname  $hostname($which)
  ns_param Port      $port($which)