Use the following procedure to start the NSD.
This shows the status of the NSD’s Windows Service and allows you to perform one of the following actions:
Alternatively, you can use the Windows Service Manager to manage the NSD. The NSD can be identified in the Service Manager by the description:
Starting NSD on Alternative TCP Port
By default, the NSD listens for incoming requests on TCP port 7038. You can override this by starting the service as follows:
CSPnsd –v [port_no]
Or:
CSPnsd –v -p[port_no]
- where port_no is the TCP port number of your choice.
On startup, the NSD creates the CSPnsd.ini file, which typically contains the following lines:
[SYSTEM]
Ip_Address=127.0.0.1
TCP_Port=7038
In this context, the clients are the Web Gateway modules contained within, or dynamically linked to, the web server and/or the CSP CGI modules invoked by the server. It is, therefore, essential that this file is not deleted or moved. It is also important that the web server processes can read this file. Set the privileges accordingly, bearing in mind the Windows user under which your web server is operating. The NSD clients attempt to find this file in a location contained within the Windows PATH variable (for example: C:\Windows). Consequently, the CSPnsd.ini file must be moved to this location before starting the web server.
It is inappropriate to store the NSD port number in the CSPnsd.ini file for the scenario in which multiple instances of the NSD are running. For Apache servers, there is a much better mechanism for communicating the TCP port number of the NSD to its clients. Specifically, set the following environment variables in the Apache configuration to indicate the address and port of the target NSD installation. The values specified in these environment variables take precedence over any values found in the CSPnsd.ini file:
Example 1: Two Apache Virtual Hosts
Distribute the load for two Apache virtual hosts (say, 123.123.1.1 and 123.123.1.2) between two independent NSD installations (listening on TCP port 7038 and 7039).
Add the following directives to the Apache configuration (httpd.conf):
<VirtualHost 123.123.1.1>
ServerName 123.123.1.1
SetEnv CSP_NSD_PORT 7038
</VirtualHost>
<VirtualHost 123.123.1.2>
ServerName 123.123.1.2
SetEnv CSP_NSD_PORT 7039
</VirtualHost>
Example 2: Two Web Applications
Distribute the load for two web applications (say, /csp1 and /csp2) between two independent NSD installations (listening on TCP port 7038 and 7039).
-
Add the following directives to the Apache configuration (httpd.conf):
<Location /csp1>
SetEnv CSP_NSD_PORT 7038
</Location>
<Location /csp2>
SetEnv CSP_NSD_PORT 7039
</Location>
-
Restart Apache after making changes to its configuration.
In cases where multiple instances of the NSD are running, it is recommended that the separate instances be installed in separate directories, each maintaining its own copy of the configuration and log file. The Web Gateway management pages for each instance can easily be accessed by using the NSD internal HTTP server. For example:
http://localhost:7038/csp/bin/Systems/Module.cxw
http://localhost:7039/csp/bin/Systems/Module.cxw