Using the built-in web server

ColdFusion has its own web server that you can use to develop ColdFusion applications, without depending on an external web server, such as Internet Information Server (IIS), Apache, or Sun Java System Web Server. Adobe 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 installation, choose a web server. If you select the built-in web server, 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, 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 appear, ensure that the document is located in the built-in web server’s web root directory; for example, C:\ColdFusion9\wwwroot\YourApp1\index.cfm.)

Note: If you install the server configuration of ColdFusion with the built-in server and port 8500 is in use, for example by ColdFusion MX, ColdFusion MX 6.1, or ColdFusion MX 7, the installer starts with port 8501 and looks at up to 100 ports to find one that is not being used by an application that is running. ColdFusion uses that port and displays a message to indicate which port it selected.

If you select an external web server, the built-in web server is deactivated.

Switching the port for the built-in web server

You can change the port on which the built-in web server runs.

Change the port for the built-in web server

  1. Back up the jrun.xml file.

    This file is in the cf_root\runtime\servers\coldfusion\SERVER-INF directory in Windows, and in the cf_root/runtime/servers/coldfusion/SERVER-INF directory in 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):

    <service class="jrun.servlet.http.WebService" name="WebService"> 
        <attribute name="port">8500</attribute> 
        <attribute name="interface">*</attribute> 
        <attribute name="deactivated">false</attribute> 
        ... 
    </service>
    Note: Ensure that the deactivated attribute is set to false.
  4. Save the file, and then restart ColdFusion.