System information

69
CONFIGURING AND ADMINISTERING COLDFUSION 9
Web Server Management
Last updated 2/21/2012
2 Open the apache_root/conf/httpd.conf file in a text editor and create virtual hosts, as necessary. For more
information, see your Apache documentation. For example:
...
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerAdmin admin@yoursite.com
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
ServerName SERVER02
ErrorLog logs/error.log
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerAdmin admin@yoursite.com
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs2"
ServerName mystore
ErrorLog logs/error-store.log
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerAdmin admin@yoursite.com
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs3"
ServerName myemployee
ErrorLog logs/error-employee.log
</VirtualHost>
...
3 Test each virtual host to ensure that HTML pages are served correctly.
4 Run the Web Server Configuration Tool, as follows:
GUI - Specify Apache for the Web Server, specify the directory that contains the httpd.conf file, and select the
Configure Web Server for ColdFusion Applications check box.
Command line - Specify -wsapache and the directory that contains the httpd.conf file, as the following example
shows:
cf_root/runtime/bin/wsconfig.exe -ws apache
-dir "c:\program files\apache group\apache2\conf"
-cfwebroot cf_root/wwwroot -coldfusion -v
For additional UNIX command-line examples, see “Using the command-line interface” on page 62.
The Web Server Configuration Tool updates the httpd.conf file. For a sample, see “Apache” on page 68.
5 Restart Apache. You store ColdFusion files for each virtual host in the directory specified by the DocumentRoot
directive.
6 Test each virtual host to ensure that ColdFusion pages are served correctly.
Sun ONE Web Server, iPlanet, and Netscape
When you use Sun ONE Web Server version 6, you use the Server Administrator to create virtual servers and run the
Web Server Configuration Tool. You store ColdFusion pages under the web root of each virtual server.
Note: For earlier versions of Sun ONE/iPlanet and Netscape Enterprise Server (NES), create separate server instances for
each site and run the Web Server Configuration Tool once for each site.
Connect multiple Sun ONE Web Server virtual hosts to a single ColdFusion server
1 Using the Sun ONE Web Server Administrator, create virtual web servers for ColdFusion to use. For more
information, see your Sun ONE Web Server documentation.