The Network Listener Module (NLM) executable, cfdist
(cfdist.exe
on Windows NT) takes the following command line options at startup. Of these options, you'll probably only use the -p option on a regular basis.
Listener Module Command Line Options | |
---|---|
Option | Description |
-v | Verbose. This option prints out confirmation of the command line options in use, and on what port the program is running. It also prints information about each connection that comes in. This can be useful to confirm that requests are, indeed, reaching the remote computer. |
-pnnnn | Port number where nnnn is the port number. If no port number is specified, the program automatically selects an unused port on which to run. In most cases, you use this option to guarantee that you're using the same port as the remote Web server. |
-i | Interactive. Run from a command line not as a daemon/service. In order for verbose commentary to appear on the terminal, you must be running in interactive mode. Aside from the display of debugging output, however, there is no difference in operation between running the program from a command line or running it as a daemon/service. |
-r | Reuse. (UNIX Only) If the specified port appears to be in use, try to use it anyway. Sometimes TCP/IP connections don't get closed down immediately. In those cases the connections can take a few minutes to timeout and close down. Unfortunately, these lingering connections will prevent the program from restarting on the same port because it thinks that port is in use. To overcome this and allow you to restart without waiting or switching to another port, you can use this option. Be careful, however, not to use this option indiscriminately as it could result in multiple versions of the listener running at the same time. |
-kxxxx | Key for encryption. (where xxxx is the string used as the key) The key may be any string of printable ASCII chars up to 127 characters long. |
-sINSTALL | Setup, install-mode. (NT Only) Install the process as an NT service. Its service name will be ColdFusion NetListener. |
-sREMOVE | Setup, remove-mode. (NT Only) Uninstall the service. |
The program will print out a list of available options along with a brief description of their purpose anytime you enter an unknown option at the command line.
It is also possible to specify startup options for the listener in an INI file. This INI file is similar to the INI file required on the Web server side, but is available on the ColdFusion engine side as a convenience (since all the required information may be supplied as command line options at startup time.) Below is a template for this INI file. If used, it must be placed in the root directory of your ColdFusion installation (on the machine hosting the ColdFusion engine), and it must be named cfdist.ini
. To enhance security, this INI file may be optionally set to be automatically deleted after being read at startup.
;------------------------------------------------------------------ ; ; Sample INI file for CFDist (AKA the "ColdFusion Listener Module"). ; ; Place this file in the root directory of your ColdFusion installation. ; It must be named "cfdist.ini" ; ; !IMPORTANT! * All values (the strings on the right hand side of ; the equals sign) must be quoted using double ; quotes. ; * All info is case insensitive.. ; * Lines beginning with a semicolon are treated as ; comments and are ignored. ; ; Use this to specify the port at which to listen for incoming ColdFusion ; requests ; ; Valid values: a valid port number (integer). ; PORT = "1234" ; Use this to specify that the data sent between the machine running ; the Web server and the machine running this program be encrypted. ; ; Valid values: Yes, No. ; ENCRYPTION = "YES" ; Use this to specify the key used to encrypt the data. ; ; Valid values: any string of up to 127 ASCII chars. ; KEY = "doglips" ; Use this to have this INI file be deleted after it is read at ; startup. (This is a security feature as it keeps your key from ; being read by others.) ; ; Valid values: Yes, No. ; DELETE = "NO" ; Use this to write a message to the ColdFusion "remote.log" confirming that ; remoting is active and what startup parameters (except the encryption ; key) were used. ; ; Valid values: Yes, No. ; MESSAGE = "YES" ; ;--------------------------------------------------------------------
The listener also writes various informative messages to the remote.log
file in the log subdirectory of your ColdFusion installation (on the machine hosting the ColdFusion engine.)