Forum OpenACS Q&A: Re: ns_conn location returning odd location
I have check now the details, how the result of [ns_conn location] is determined in detail:
if "ns_locationproc" is configured, its result is returned.
if virtual hosting is enabled, and the "Host:" header field is provided and valid, it returns its content.
If everything above fails, it is determined by virtual hosts mapping table (as defined in the "ns/module/nssock/servers" or "ns/module/nsssl/servers" section in the configuration file).
If everything above fails, and a connection is open, it is determined by the current socket address.
If everything above fails, it is determined by configuration values of the driver.
I'll make sure that this is added to manual pages of NaviServer.