Forum OpenACS Q&A: Response to How to test Jerry's nsvhr/nsunix virtual hosting on development box?

Looks like nssock of the master server is not correctly configured. Does it say nssock: listening on port xxx as desired after startup?

Do you want the master server to listen on port 80 or on port 8000? If it listens on 80 then you should be able to request www.firstserver.com and www.secondserver.com, if it listens on 8000 then it should answer on www.firstserver.com:8000 like your wrote above, but I wonder what the point of this would be, since the only benefit of virtual hosting is that you can leave out the port number. Otherwise you could just setup localhost:8001 for your first test server and localhost:8002 for the second, without the need for a master server and nsvhr.

To be sure I'd also test this with telnet firstname.com 8000 and also with telnet localhost 8000 to make sure it's not a problem with name resolution.

When the master is correctly accepting connections then it should at least answer your request, even if it cannot connect to the slave server for whatever reason. You would get a 404 Not Found or custom error page if configured, but never a connection refused.

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.)

There is an additional Port parameter in my setup:

ns_section "ns/server/${servername}/module/nsunix"
        ns_param Port 80
        ns_param hostname "bla" 
        ns_param socketfile "bla.nsunix"
I have no idea where it comes from nor what it does, besides generating the above warning if you leave it out (i just tried that).

About the log files not being written: maybe you are running with the -f option? The server log seems not to be written in foreground mode.