Tuesday, January 3, 2006

Using the built-in web server

Using the built-in web server

ColdFusion MX 6.1 has its own web server that you can use to develop ColdFusion MX applications, without depending on an external web server, such as Internet Information Server (IIS), Apache, or iPlanet. Macromedia does not recommend using the built-in web server in a production environment. However, it is more than suitable for development, allowing you to create virtual directories and set the default document (for example, default.cfm or index.cfm). During the ColdFusion MX 6.1 installation, you must choose a web server. If you select the builtin server, then your web root directory is located in the cf_root/wwwroot directory. By default, the web server runs on port 8500. This means that to display a page in your application, you must append :8500 to the host name or IP address in the URL; for example, http://localhost:8500/YourApp1/index.cfm. (If the page still does not display, make sure that the document is located in the built-in web server’s web root directory; for example, C:\CFusionMX\wwwroot\YourApp1\index.cfm.) Switching the port for the built-in web server You can change the default port on which the built-in web server runs.

To change the default port for the built-in web server:

1 Back up the jrun.xml file.

This file is in the cf_root\runtime\servers\default\SERVER-INF directory in Windows, and in the cf_root/runtime/servers/default/SERVER-INF directory on UNIX.

2 Open the original jrun.xml file for editing.

3 Change the port number specified in the WebService port attribute (near the bottom of the file):

8500

*

false

Note: Make sure that the deactivated attribute is set to false.

4 Save the file.

5 Restart ColdFusion MX.

Switching from another web server

You can switch from an external web server to the built-in ColdFusion MX web server without reinstalling, even if you did not select it during installation.

To switch from an external web server to the built-in web server:

1 Back up the jrun.xml file.

This file is in the cf_root\runtime\servers\default\SERVER-INF directory in Windows, and in the cf_root/runtime/servers/default/SERVER-INF directory on UNIX.

2 Open the original jrun.xml file for editing.

3 Locate the WebService service and set the deactivated attribute to false:

8500

*

false

4 Locate the ProxyService service and set the deactivated attribute to true:

8

1

1000

0

20

500

true

...

5 Save the file.

6 Copy the CFM pages in your web root directory (including the CFIDE and cfdocs directories) to the ColdFusion MX cf_root/wwwroot directory, and use appropriate URL references (for example, http://localhost:8500/YourApp1/index.cfm). If you switch from the built-in web server to an external web server, you must copy the contents of the cf_root/wwwroot directory to your web server root.

7 Restart ColdFusion MX.

To switch to another web server, follow the instructions for the appropriate web server on your platform in Chapter 4, “Configuring web servers,”

Note: The installation wizard does not allows you to configure both an external web server and the

built-in web server and in most cases, you do not enable both the built-in web server and an external

web server. If you do, you must create web server directory mappings so that both web servers use

the same web root.

Uninstalling ColdFusion MX 6.1

The steps for uninstalling ColdFusion MX 6.1 depend on your operating system. This section contains instructions for Windows and UNIX.

Uninstalling ColdFusion MX 6.1 from Windows

Uninstalling ColdFusion MX 6.1 deletes all program files and related components from your

computer.

To uninstall ColdFusion MX 6.1 from Windows:

1 Select Start > Settings > Control Panel > Add/Remove Programs >

Macromedia ColdFusion MX.

2 Uninstall ColdFusion MX.

3 When the program completes, remove any remaining files and directories in the cf_root

directory.

4 In some cases, the uninstall program may require that you restart the computer.

ColdFusion MX 6.1 is deleted from your server.

Uninstalling ColdFusion MX 6.1 from UNIX

Uninstalling ColdFusion MX 6.1 deletes all program files and related components from your

computer.

To uninstall ColdFusion MX 6.1 from UNIX:

1 Log in as root.

2 Enter the following command to go to the cf_root/uninstall directory:

cd cf_root/uninstall

3 Enter the following command:

./uninstall.sh

4 When the program completes, remove any remaining files and directories in the cf_root directory. ColdFusion MX 6.1 is deleted from your server.

No comments: