Configuring and Administering ADOBE COLDFUSION 9 ® ®
© 2009 Adobe Systems Incorporated. All rights reserved. Copyright Configuring and Administering Adobe® ColdFusion® 9 This guide is licensed for use under the terms of the Creative Commons Attribution Non-Commercial 3.0 License.
iii Contents Chapter 1: Introduction About ColdFusion documentation ..................................................................................... 1 Chapter 2: Administering ColdFusion About the ColdFusion Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 About web server administration About Verity administration .....................................................
iv CONFIGURING AND ADMINISTERING COLDFUSION 9 Contents Chapter 5: Web Server Management About web servers in ColdFusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Using the built-in web server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CONFIGURING AND ADMINISTERING COLDFUSION 9 Contents Chapter 12: Indexing Collections with Verity Spider About Verity Spider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 About Verity Spider syntax Core options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 Chapter 1: Introduction Configuring and Administering ColdFusion is intended for anyone who has to configure and manage their Adobe® ColdFusion® 9 development environment. About ColdFusion documentation The ColdFusion 9 documentation is designed to provide support for the complete spectrum of participants.
2 Chapter 2: Administering ColdFusion Although you use the ColdFusion Administrator to perform most ColdFusion administration tasks, you can also manage databases, web server configurations, and Verity Search Server. About the ColdFusion Administrator The ColdFusion Administrator provides a browser-based interface for managing your ColdFusion environment. You can configure many settings to provide optimal levels of security and functionality.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Administering ColdFusion About Verity administration ColdFusion includes Verity K2 Server search technology. Verity K2 Server is a high-performance search engine designed to process searches quickly in a high-performance, distributed system. For more information, see “Introducing Verity and Verity Tools” on page 116.
4 Chapter 3: Using the ColdFusion Administrator Use the Adobe ColdFusion Administrator to perform basic administration tasks. You can also use the Administrator application programming interface (API) to perform Administrator functionality programmatically.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Accessing user assistance You can use the buttons on the upper left of the ColdFusion Administrator to access online Help, information about additional resources, and system information. Online Help Click the question-mark icon on any ColdFusion Administrator page to access the context-sensitive online Help. The online Help has procedural and brief overview content for the ColdFusion Administrator page that you are viewing.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Option Description Enable Whitespace Management Compresses repeating sequences of spaces, tabs, and carriage returns and linefeeds. Compressing whitespace can significantly compact the output of a ColdFusion page. This option is enabled, by default. Disable CFC Type Check Turns off verifying the CFC type when calling methods with CFCs as arguments.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Option Description Site-Wide Error Handler Specify a page to execute when ColdFusion encounters an error while processing a request. This specification is relative to the web root. When you define a site-wide error handler or missing template handler, ColdFusion does not log page-not-found errors and exceptions.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Caching page The Caching page of the Administrator contains configuration options that you can set or enable to cache templates, queries, and data sources. These options can significantly affect server performance. The following table describes the settings: Option Description Maximum Number Of Cached Templates Enter a value that specifies the number of templates that ColdFusion caches.
9 CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Important: Adobe recommends that you do not store client variables in the registry because it can critically degrade performance of the server. If you use the registry to store client variables, you allocate sufficient memory and disk space. To override settings specified in the Client Variables page, use the Application.cfc file or the cfapplication tag. For more information, see the Developing ColdFusion Applications.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Creating client variable tables Use the following sample ColdFusion page as a model for creating client variable database tables in your own database. However, keep in mind that not all databases support the same column data type names. For the proper data type, see your database documentation. Note: The ColdFusion Administrator can create client variable tables for data sources that use one of the bundled JDBC drivers.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Note: Time-out values that you specify for application variables override the time-out values set in the Application.cfc or Application.cfm file. You can also specify whether to use J2EE session variables. When you enable the J2EE session variables, ColdFusion creates an identifier for each session and does not use the CFToken or CFID cookie value. For more information, see the Developing ColdFusion Applications.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Option Description Keystore Location of the Keystore containing the private key and certificate. The supported type is JKS (java key store) and pkcs12. Keystore Password Keystore password. KeyAlias Alias of the key with which the certificate and private key is stored in Keystore. If it is not specified then the first entry in the Keystore is be picked up. KeyPassword Password with which the private key is stored.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Mail Logging Settings area Select preferences for handling mail logs, as described in the following table: Option Description Error Log Severity From the drop-down list object, select the type of SMTP-related error message to write to a log file.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Option Description Cache Type Set the cache type. Charts can be cached either in memory or to disk. Memory caching is faster, but more memory intensive. Maximum Number Of Cached Images Specify the maximum number of charts to store in the cache. After the cache is full, if you generate a new chart, ColdFusion discards the oldest chart in the cache.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Option Description Maximum JVM Heap Size The JVM maximum heap size. The default value is 512 MB. ColdFusion Class Path The file paths to the directories that contain the JAR files that ColdFusion uses. Specify either the fully qualified name of a directory that contains your JAR files or a fully qualified JAR filename. Use a comma to separate multiple entries. JVM Arguments The arguments to the JVM.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator ColdFusion lets you manage your collections from the Administrator. You can index, optimize, purge, or delete Verity/Solr collections that are connected to ColdFusion. You use the icons in the Actions column to perform the following actions: Action Description Index Analyzes the files in a collection and assembles metadata and pointers to the files.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Option Description Enable Flash Remoting Support Specifies whether to enable Flash clients to connect to this ColdFusion server and invoke methods in ColdFusion components (CFCs).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Configure Flex 1 To export the keystore to a certificate, use the keytool utility, with a command similar to the following: keytool -export -v -alias FlexAssembler -keystore cf.keystore -rfc -file cf.cer 2 To import the certificate into the JRE cacerts file for your server, use the keytool utility, with a command similar to the following: keytool -import -v -alias FlexAssembler -file cf.
19 CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Option Description Report Execution Times Reports execution times that exceed a specified time limit. General Debug Information Show general information about the ColdFusion MX version, template, timestamp, user locale, user agent, user IP, and host name. Database Activity Shows the database activity for the SQL Query events and Stored Procedure events in the debugging output.
20 CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Metric abbreviation Metric name Description AvgReq Time Average request time A running average of the time, in milliseconds, that it takes ColdFusion to process a request (including queued time). Lower values, which you can achieve with efficient CFML, are better. Averages are displayed for the last two completed requests.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=#portNum# To stop a currently running debugging session, click Stop Debugging. For the changes that you specify on this page to take effect, restart the ColdFusion server. Logging Settings page Use the Logging Settings page of the Administrator to change ColdFusion logging options.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Log file Description server.log Records errors for ColdFusion. customtag.log Records errors generated in custom tag processing. car.log Records errors associated with site archive and restore operations. mail.log Records errors generated by an SMTP mail server. mailsent.log Records messages that ColdFusion sends. flash.log Records entries for Flash® Remoting. Enable/Disable logging In ColdFusion 9.0.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator System Probes page System probes help you evaluate the status of your ColdFusion applications. Like scheduled tasks, they access a URL at a specified interval, but they can also check for the presence or absence of a string in the URL. If the URL contents are unexpected, or if an error occurred while accessing the URL, the probe can send an e-mail alert to the address specified on the System Probes page.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Extensions section Use the Extensions section of the Administrator to configure ColdFusion to work with other technologies, such as Java and CORBA. Java Applets page The Java Applets page of the Administrator lets you register applets and edit and delete applet registrations. Before you can use Java applets in your ColdFusion applications, register them in the Java Applets page.
25 CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Operating System Vendor ORB ColdFusion connector ORB library Windows NT and later Borland VisiBroker 4.5 coldfusion.runtime.corba.VisibrokerConnector (embedded) vbjorb.jar Solaris Borland VisiBroker 4.5 coldfusion.runtime.corba.VisibrokerConnector (embedded) vbjorb.jar Example of a CORBA connector configuration for VisiBroker: ORB Name ORB Class Name ORB Property File Classpath visibroker coldfusion.runtime.
26 CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Gateway type Description FMS Gateway Modifies data through the ColdFusion application or the Flash client, and reflects the change in the Flash Media Server shared object. SMS Used to send and receive SMS messages. SAMETIME Used to send and receive instant messages through Lotus SameTime. XMPP Used to send and receive instant messages through the Extensible Messaging and Presence Protocol (XMPP).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator RDS page Use the RDS page to enable and disable password-restricted RDS access to server resources from Adobe Macromedia Dreamweaver MX , Adobe Macromedia HomeSite+ , ColdFusion Extensions for Eclipse, or the ColdFusion Report Builder, and to change the RDS password. You can also configure all users to use a single RDS password, or allow only users defined in the User Manager to have access through RDS.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Packaging and Deployment section The Packaging and Deployment section of the Administrator lets you create and deploy CAR files. You can also create J2EE EAR or WAR files that include an existing ColdFusion application and the ColdFusion runtime system.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Enterprise Manager section The Enterprise Manager section of the Administrator lets you create JRun server instances with ColdFusion already deployed, register remote JRun server instances, and create clusters of JRun server instances. Note: The Enterprise Manager section appears only if you install the multiserver configuration. It does not display in the server configuration.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Alternatively, you can extend the ColdFusion Administrator by editing the wwwroot/CFIDE/administrator/custommenu.xml file. Administrator API You can use the Administrator API to perform most ColdFusion Administrator tasks programmatically. The Administrator API consists of a set of ColdFusion components (CFCs) that contain methods you call to perform Administrator tasks. For example, you use the setMSQL method of datasource.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator Use the Administrator API 1 Instantiate administrator.cfc: // Login is always required. adminObj = createObject("component","cfide.adminapi.administrator"); Note: You can instantiate administrator.cfc and call the login method in a single line of code, as the following example shows: createObject("component","cfide.adminapi.administrator").
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator // Login is always required. This example uses two lines of code. adminObj = createObject("component","cfide.adminapi.administrator"); adminObj.login("admin"); // Instantiate the data source object. myObj = createObject("component","cfide.adminapi.datasource"); // Create a DSN. myObj.setMSSQL(driver="MSSQLServer", name="northwind_MSSQL", host = "xx.x.xxx.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Administrator // Login is always required. This example uses a single line of code. createObject("component","cfide.adminapi.administrator").login("admin"); // Instantiate the data source object. myObj = createObject("component","cfide.adminapi.datasource"); // Required arguments for a data source. stDSN = structNew(); stDSN.driver = "MSSQLServer"; stDSN.name="northwind_MSSQL"; stDSN.host = "xx.x.xxx.xx"; stDSN.port = "1433"; stDSN.
34 Chapter 4: Data Source Management A data source is a complete database configuration that uses a JDBC driver to communicate with a specific database. In Adobe ColdFusion, you configure a data source for each database that you want to use. After you configure a data source, ColdFusion can then communicate with that data source through JDBC. For basic information on data sources and connecting to databases, click Resources in the ColdFusion Administrator, and then select Getting Started Experience.
35 CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management JDBC drivers are stored in JAR files. For example, the JDBC drivers that are supplied with ColdFusion are in the _drivers.jar file. If you are using another JDBC driver, you must store it in the ColdFusion classpath. For example, cf_root/cfusion/lib (server configuration) or cf_webapp_root/WEB-INF/cfusion/lib (multiserver or J2EE configuration).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Adding data sources in the Administrator You use the ColdFusion Administrator to quickly add a data source for use in your ColdFusion applications. When you add a data source, you assign it a data source name (DSN) and set all information required to establish a connection. Note: ColdFusion includes data sources that are configured by default. You do not need the following procedure to work with these data sources.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management • Data source names can contain only letters, numbers, hyphens, and the underscore character (_). • Data source names must not contain special characters or spaces. • Although data source names are not case sensitive, use a consistent capitalization scheme. • Depending on the JDBC driver, connection strings and JDBC URLs might be case sensitive. • Use the Administrator to verify that ColdFusion can connect to the data source.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description CLOB Returns the entire contents of any CLOB/ Text columns in the database for this data source. If deselected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting. For UDB 7.1 and 7.2, a 32K limit on CLOBs exists. BLOB Returns the entire contents of any BLOB/Image columns in the database for this data source.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description BLOB Returns the entire contents of any BLOB/Image columns in the database for this data source. If deselected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting. BLOBs are not supported on UDB 7.1 and 7.2. LongText Buffer (chr) The default buffer size, used if the CLOB option is not selected. The default value is 64000 bytes.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description Max Pooled Statements Enables reuse of prepared statements (that is, stored procedures and queries that use the cfqueryparam tag).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description Limit Connections Specifies whether ColdFusion limits the number of database connections for the data source. If you enable this option, use the Restrict Connections To field to specify the maximum. Restrict Connections To Specifies the maximum number of database connections for the data source. To use this restriction, enable the Limit Connections option.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description Description (Optional) A description for this connection. Page Timeout The number of milliseconds before a request for a ColdFusion page times out. The default is 600. If you observe excessive network activity when using this driver, increase the page time-out value. Max Buffer Size The size of the internal buffer, in kilobytes, that Access uses to transfer data to and from the disk.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description CF Data Source Name The data source name (DSN) that ColdFusion uses to connect to the data source. Database File The file that contains the database. Description (Optional) A description for this connection. ColdFusion User name The user name that ColdFusion passes to the JDBC driver to connect to the data source if a ColdFusion application does not supply a user name (for example, in a cfquery tag).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description CF Data Source Name The data source name (DSN) that ColdFusion uses to connect to the data source. Database The database to which this data source connects. Server The name of the server that hosts the database that you want to use. If the database is local, enclose the word local in parentheses. If you are running SQL Server locally (or using MSDE), specify 127.0.0.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description BLOB Buffer The default buffer size, used if the BLOB option is not selected. The default value is 64000 bytes. Allowed SQL The SQL operations that can interact with the current data source. Validation query Called when a connection from the pool is resued. This can slow query response time because an additional query is generated.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Troubleshooting SQL Server connections If you are having trouble establishing a connection to SQL Server, review the following considerations: • If you installed SQL Server using a server name other than the default, use your chosen domain\servername wherever there’s a reference to (local).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description Password The password that ColdFusion passes to the JDBC driver to connect to the data source, if a ColdFusion application does not supply a password (for example, in a cfquery tag). Description (Optional) A description for this connection. Connection String A field that passes database-specific parameters, such as login credentials, to the data source.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management DataDirect Connect JDBC Support ColdFusion 9 supports the latest version of DataDirect drivers for database operations. These drivers improve performance and provide support for additional databases. DataDirect driver features ColdFusion transacts with the database server using the DataDirect drivers that are available as packaged JAR files.
49 CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management • setOracle() • setSybase() • setInformix() • setMSSQL() Note: The qtimeout option is not supported by all databases. For more information about DataDirect JDBC Connect, see: • http://www.datadirect.com/techres/jdbcproddoc/index.ssp (for PDF) • http://media.datadirect.com/download/docs/jdbc/alljdbc/wwhelp/wwhimpl/js/html/wwhelp.
50 CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Property Relevance Description Applies to requireSSL Optional true|false MySQL Require SSL connection if useSSL=true verifyServerCertificat e Optional true|false MySQL Determines whether to validates the certificate sent by the database server clientCertificateKeySt Applies only if client authentication is enabled URL to the client certificate KeyStore. If not oreUrl on the database server specified, use defaults.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Database Database Driver Connection Property Oracle Oracle EncryptionMethod=SSL; KeyStore=path to keystore; KeyStorePassword=keystore Password; KeyPassword=key Password; TrustStore=path to keystore; TrustStorePassword=trustStorePassword; ValidateServerCertificate=true|false; HostNameInCertificate=host_name|#SERVERNAME#}; Sybase Sybase EncryptionMethod=SSL;TrustStore=path to keystore; TrustStorePassword=trustStorePassword; ValidateServ
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description Limit Connections Specifies whether ColdFusion limits the number of database connections for the data source. If you enable this option, use the Restrict Connections To field to specify the maximum. Restrict Connections To Specifies the maximum number of database connections for the data source. To use this restriction, enable the Limit Connections option.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description Connection String A field that passes database-specific parameters, such as login credentials, to the data source. Limit Connections Specifies whether ColdFusion limits the number of database connections for the data source. If you enable this option, use the Restrict Connections To field to specify the maximum. Restrict Connections To Specifies the maximum number of database connections for the data source.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description CF Data Source Name The data source name (DSN) that ColdFusion uses to connect to the data source. JDBC URL The JDBC connection URL for this data source. Driver Class The fully qualified class name of the driver. For example, com.inet.tds.TdsDriver. The JAR file that contains this class must be in a directory defined in the ColdFusion classpath. Driver Name (Optional) The name of the driver.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Connection string Specify one connection string for the first connection, and then modify it for use in subsequent connections, as follows: 1 On the initial connection, specify LocationName, CollectionId, CreateDefaultPackage, and sendStringParametersAsUnicode (with no spaces) as the following example shows: LocationName=SAMPLE;CollectionId=DEFAULT;CreateDefaultPackage=TRUE;sendStringParametersAs Unicode=false Note: If the database uses U
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description Disable Connections If selected, suspends all client connections. Login Timeout (sec) The number of seconds before ColdFusion times out the attempt to log in to the data source connection. CLOB Select to return the entire contents of any CLOB/ Text columns in the database for this data source. If not selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description Limit Connections Specifies whether ColdFusion limits the number of database connections for the data source. If you enable this option, use the Restrict Connections To field to specify the maximum. Restrict Connections To Specifies the maximum number of database connections for the data source. To use this restriction, enable the Limit Connections option.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Data Source Management Setting Description Description (Optional) A description for this connection. JNDI Environment Settings Specifies additional JNDI environment settings, if necessary by the JNDI data source. Use commaseparated list of name-value pair.
59 Chapter 5: Web Server Management You can connect Adobe ColdFusion to the built-in web server and to external web servers, such as Apache, IIS, and Sun ONE Web Server (formerly known as iPlanet). ColdFusion lets you manage web servers when running in the server configuration, in the multiserver configuration, and when deploying on Macromedia JRun in the J2EE configuration. (Some J2EE application servers include web server plug-ins that provide similar functionality.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management Note: When you install ColdFusion Enterprise Edition using the multiserver configuration, the installation wizard always configures the built-in web server, even if you select an external web server.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management Web server Connector details Apache The Web Server Configuration Tool adds the following elements to the Apache httpd.conf file: • A LoadModule directive defines the connector. • An AddHandler directive tells Apache to route requests for ColdFusion pages through the connector. For Apache 1.3.x, the connection module is mod_jrun.so; for Apache 2.x, the connection module is mod_jrun20.so.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management 4 Click Add. 5 Select Configure Web Server For ColdFusion Applications. 6 In the Server drop-down list, select the server or cluster name that you want to configure. (Individual server names in a cluster do not appear. Clustering support is only available on the multiserver configuration.) Note: The server or cluster does not have to reside on the web server computer.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management Option Description -host Specifies the ColdFusion server address. The default value is localhost. -server Specifies the ColdFusion server name. -username Specifies a user name defined to the JRun server. The default value is guest account. -password Specifies a password that corresponds to -username. The default value is guest account. -norestart Specifies not to restart the web server. -cluster Specifies the JRun cluster name.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management command-line interface examples Examples of multiple use-cases for different web servers: 1 Configure a specific IIS site: cf_root/runtime/bin/wsconfig.exe -server coldfusion -ws iis -site "web31" -coldfusion -v On systems where all sites run ColdFusion, there is generally no need to configure an individual site. 2 Configure all existing IIS sites (ISPs): cf_root/runtime/bin/wsconfig.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management Property Description bootstrap Specifies the IP address and port on which the JRun server’s proxy service is listening for connector requests. JRun must also be configured to listen on this port and address combination, the ProxyService must be activated, and the JRun server must be running. Specify ipaddress:portnumber (for example, 127.0.0.1:51011).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management # JRun Settings LoadModule jrun_module "C:/coldfusion9/runtime/lib/wsconfig/1/mod_jrun20.so" JRunConfig Verbose false JRunConfig Apialloc false JRunConfig Ssl false JRunConfig Ignoresuffixmap false JRunConfig Serverstore "C:/coldfusion9/runtime/lib/wsconfig/1/jrunserver.store" JRunConfig Bootstrap 127.0.0.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management ...
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management Multihoming configuration tasks include: Enabling access to the ColdFusion Administrator If any of the applications under a virtual host need to access the ColdFusion Administrator, create a web server mapping (Alias directive in Apache) for /CFIDE that points to the original CFIDE directory. Alternatively, you can copy the entire CFIDE directory to the virtual website.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management 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 ServerAdmin admin@yoursite.com DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs" ServerName SERVER02 ErrorLog logs/error.log ServerAdmin admin@yoursite.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Web Server Management 2 Configure DNS for each virtual website, as described in your web server documentation. 3 Test each virtual server to ensure that HTML pages are served correctly. 4 Run the Web Server Configuration Tool, as follows: • GUI - Specify Netscape Enterprise Server/Sun ONE for the web server, specify the directory that contains the obj.conf and magnus.conf files, and select the Configure Web Server for ColdFusion Applications check box.
71 Chapter 6: Deploying ColdFusion Applications Adobe ColdFusion includes archive and deployment options that let you package applications and create archive files. Archive and deployment options ColdFusion includes the following archive and deployment options. ColdFusion archive files You can package your ColdFusion application’s pages, data sources, and settings in a ColdFusion Archive (CAR) file. For more information, see “Packaging applications in CAR files” on page 71.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Deploying ColdFusion Applications Packaging applications in J2EE archive files When running ColdFusion in the multiserver and J2EE configurations, you deploy the ColdFusion application, in enterprise application archive (EAR) or web application archive (WAR) format, on a J2EE application server.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Deploying ColdFusion Applications Setting Description Include CFML Source You can optionally deploy Java bytecode instead of CFML source code. For more information, see “Sourceless distribution” on page 74. ColdFusion Administrator If your application does not require modification by using the ColdFusion Administrator, you can reduce archive size and reduce security issues by omitting the Administrator files.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Deploying ColdFusion Applications cfcompile webroot [directory-to-compile] The following table describes these parameters: Parameter Description webroot Fully qualified path to the web server root; for example, C:\Inetpub\wwwroot or C:\coldfusion9\wwwroot. directory-to-compile Fully qualified path to the directory where the files to be compiled are located. This directory must be under the web root directory.
75 Chapter 7: Administering Security You can secure many Adobe ColdFusion resources using password authentication and configure sandbox security. About ColdFusion security Security is especially important in web-based applications, such as those you develop in ColdFusion. ColdFusion developers and administrators must fully understand the security risks that could affect their development and runtime environments so they can enable and restrict access appropriately.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Administering Security Configurable seed for password encryption In ColdFusion 9 Update 1, Administrator has option to specify a new seed value to encrypt data source passwords. Previously, ColdFusion used to assign a default seed value to encrypt data source passwords, but modification was not allowed.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Administering Security Configure IP address to access exposed services To configure IP addresses to access exposed services: 1 Go to Security > Allowed IP Addresses 2 To add an IP address, specify the IP address in the IP addresses field and click Add. 3 To remove an IP address, select the IP address from the View/Remove Selected IP Addresses for Exposed Services list. 4 Click Remove Selected to remove the IP addresses.
78 CONFIGURING AND ADMINISTERING COLDFUSION 9 Administering Security Resources that you can restrict You can restrict the following resources: Data Sources Restrict the use of ColdFusion data sources. CF Tags Restrict the use of ColdFusion tags that manipulate resources on the server (or on an external server), such as files, the registry, Lightweight Directory Access Protocol (LDAP), mail, and the log. CF Functions Restrict the use of ColdFusion functions that access the file system.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Administering Security The new sandbox appears in the list of Defined Directory Permissions. Configure a sandbox Before you begin security sandbox configuration, analyze your application and its usage to determine the tags, functions, and resources that it requires. You can then configure the sandbox to enable access to the required resources and disable use of the appropriate tags and functions.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Administering Security Note: The Files/Dirs tab works together with the file-based permissions of the operating system. To restrict a user from browsing another user’s directory, use file-based permissions. 13 Click the Server/Ports tab.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Administering Security Also, read permission must be granted to cf_root\lib\ehcache.xml for certain functions that read from/write to ehCache.xml to work. For example, cacheGetProperties and cacheSetProperties. Using Service CFCs within Sandbox Grant the following permissions: • execute permission to cf_root\CustomTags\com\adobe\coldfusion • read permission to cf_root\WEB-INF\cftags\META_INF\taglib.
82 Chapter 8: Using Multiple Server Instances When you use the multiserver configuration to install Adobe ColdFusion Enterprise Edition, you can use the ColdFusion Administrator to create multiple server instances. Deploying ColdFusion on multiple server instances lets you isolate individual applications and leverage clustering functionality.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Multiple Server Instances File location considerations ColdFusion lets you store CFM pages either under the external web server root or under the ColdFusion web application root. The discussions here assume that you store your CFM pages under the ColdFusion web application root and specify a context root for your application. However, in ColdFusion MX 6.1 documentation, the assumption that you stored CFM pages under the web server root.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Multiple Server Instances • (Optional, Windows only) Specify whether to create a Windows service for the server instance and whether to define the Windows service with an auto restart recovery option. 6 Click Submit. The ColdFusion Administrator creates a server instance with ColdFusion deployed in it and starts the server instance.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Multiple Server Instances For example, with a context root of cf, users access CFM pages by specifying http://hostname/cf/pagename.cfm. For more information on using a context root, see Installing ColdFusion. Note: Although cf is the context root, it does not relate to your web application directory structure.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Multiple Server Instances Configure multiple server instances for application isolation when using Apache 1 Run the Web Server Configuration Tool once, specifying the location of the Apache httpd.conf file and any other required information. Ensure that you select the Configure Web Server for ColdFusion MX Applications option (GUI) or use the -coldfusion option (command line).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Multiple Server Instances ... # JRun Settings LoadModule jrun_module "C:/JRun4/lib/wsconfig/1/mod_jrun20.so" JRunConfig Verbose false JRunConfig Apialloc false JRunConfig Ssl false JRunConfig Ignoresuffixmap false JRunConfig Serverstore "C:/JRun4/lib/wsconfig/1/jrunserver.store" JRunConfig Bootstrap 127.0.0.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Multiple Server Instances ... # JRun Settings LoadModule jrun_module "C:/JRun4/lib/wsconfig/1/mod_jrun20.so" JRunConfig Verbose false JRunConfig Apialloc false JRunConfig Ssl false JRunConfig Ignoresuffixmap false #JRunConfig Serverstore "C:/JRun4/lib/wsconfig/1/jrunserver.store" #JRunConfig Bootstrap 127.0.0.1:51020 AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf NameVirtualHost 127.0.0.1
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Multiple Server Instances Configure multiple server instances for application isolation when using Sun ONE Web Server Run the Web Server Configuration Tool for each Sun ONE Web Server instance. Specify a different configuration directory and ColdFusion server instance each time. Ensure that you select the Configure Web Server for ColdFusion MX Applications option (GUI) or use the -coldfusion option (command line).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Multiple Server Instances 4 Select Packaging & Deployment > J2EE Packaging. 5 Use the J2EE Archives page to create an EAR file that contains the application, its CFM pages, the required data sources, and other settings. 6 Select Enterprise Manager > Instance Manager. 7 Create server instances for the cluster as described in “Defining additional server instances” on page 83. Use the Create From EAR/WAR field to specify the archive file that you created.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Multiple Server Instances 18 For servers that are not on the same subnet, open the jrun_root/lib/security.properties file and add the IP addresses of the other JRun servers in the cluster to the jrun.trusted.hosts property. Note: This step is required only for servers that are not on the same subnet; it is not necessary if all servers are on the same subnet.
92 Chapter 9: Using the ColdFusion Server Monitor The ColdFusion Server Monitor lets you track activities on a ColdFusion Server. You can identify information about the server, including requests, queries, memory usage, and errors. You can start and stop collecting server information and take snapshots of the server. To track the status of more than one ColdFusion server, use the Multiserver Monitor.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor Start the ColdFusion Multiserver Monitor 1 Start the ColdFusion Administrator. 2 Select Server Monitoring > Server Monitor, and then click Launch Multiserver Monitor. Note: The cross domain details need to be mentioned in the crossdomain.xml file and this file must be placed directly under webroot. Previously, this file was placed under /CFIDE/multiservermonitor-access-policy.xml. For more information, see www.adobe.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor Turning on or off monitoring, profiling, and memory tracking determines which data the Server Monitor gathers. For example, all the query reports require that you turn on profiling. The performance effect of turning on monitoring and profiling is minimal; however the performance effect of memory tracking can be significant. Overview The Overview page appears when you start the ColdFusion Server Monitor.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor Active Requests The Active Requests report lists all currently active requests that take longer to load than the request interval for reports specified in the Refresh Interval setting. Requests include browser requests, CFC HTTP requests, web services, gateways, and Flash remoting. You can view a list, a detailed view, or a graph of active requests.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor be compiled before being placed in the cache. A server that is performing well should have more cache hits than misses, which is a high cache-hit ratio. If the cache-hit ratio is too low, you might want to increase the cache size by selecting Server Settings > Caching in the ColdFusion Administrator. For more information, see “Caching” on page 102.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor Application Scope Memory Usage The Application Scope Memory Usage report lists the application scopes that use the most memory. The detail lists the application scope variables that use the most memory. Server Scope Memory Usage The Server Scope Memory Usage page lists the server scope variables that use the most memory.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor Requests with Errors The Requests with Errors report lists the templates that generate an error. The report includes the path of the template, and the number of times errors occurred in that template. For the most recent error, the report indicates the time of the error, the error message, CFML stack traces, and Java stack traces. You can view a list of templates or details about an individual template.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor • The threshold for either an unresponsive server or a slow server is exceeded When you click Trigger Snapshot, the Server Monitor collects the information for the snapshot and saves it in a file named snapshot_usrgen_timestamp.txt in the cf_root/logs/snapshots folder. When the Server Monitor creates a snapshot, it saves the information in a file named snapshot_sysgen_timestamp.txt in the cf_root/logs/snapshots folder.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor 2 Call the administrator.cfc login method, passing the ColdFusion Administrator password or the RDS password: adminObj.login("admin"); 3 Instantiate the Server Monitor CFC: myObj = createObject("component","cfide.adminapi.servermonitoring"); 4 Call the CFC method you want (this example uses getAverageResponseTime): myObj.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor JVM memory usage Because ColdFusion is an enterprise Java application, the Java Virtual Machine (JVM) is the software component that most influences performance. Different JVMs from different vendors and different versions of the same JVM from the same vendor have different performance characteristics. You might benefit from changing the JVM that you are using with ColdFusion.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor Variable memory usage Configure client variable storage to use cookies or an RDBMS for best performance when using client variables; you do this on the Client Variables page of the ColdFusion Administrator. Wherever possible, it is best to fully scope your variable names, especially when using the isdefined() function. For example, performs much better than .
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor Setting up Server Manager client Server Manager is an AIR-based desktop application that allows you to centrally manage multiple ColdFusion servers from one location. From the Server Monitoring page, you can download and install the Server Manager client AIR application. For details about configuring the Server Manager client for ColdFusion server instances, see “Working with Server Manager” on page 107.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor cf_root\lib (in the server configuration) or cf_root/WEB-INF/cfusion/lib (in the J2EE configuration). Modify the value to true in the following code: Jetty.xml Modify Jetty.xml only if you have to change the port or if your connection uses HTTPS protocol.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor 0.0.0.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using the ColdFusion Server Monitor Monitoring with SSL You might encounter an error while starting Monitoring Server in SSL mode. To resolve this known issue, add the following in the jvm.config: "-Dcoldfusion.disablejsafe=true" Updating the threadpool You can update the threadpool in the jetty.xml. Modify the threadpool in the Server Threadpool section of the XML file: PAGE 112107 Chapter 10: Working with Server Manager Adobe ColdFusion Server Manager is an Adobe AIR application packaged with ColdFusion 9 installation. It enables ColdFusion Server administrators to monitor and manage multiple servers and apply the settings from one ColdFusion server to other ColdFusion servers. Launch Server Manager Before starting Server Manager, ensure that you have AIR installed because Server Manager requires the AIR platform to run. You can download AIR from: http://get.adobe.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Working with Server Manager Note: The Server Manager AIR application supports only ColdFusion 9 instances. To register a ColdFusion server: 1 Click the (+) sign in the right-pane of the Server Manager. 2 Enter the server details including the server name, host name/IP address, port number, context root (for J2EE servers), and its user name and password. You can configure the host by specifying any either the hostname or the IP address.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Working with Server Manager For details about the WAR files corresponding to each application server and the parameters required to run start/stop operations see: • JRun-specific parameters • WebLogic Server-specific parameters • WebSphere-specific parameters • JBoss specific parameters Note: Options such as start, stop, or restart would be enabled only after you provide the required details under Start/Stop Details tab.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Working with Server Manager The JRun parameters in the Start/Stop Details tab of Server Manager are: • User name and Password The user name and password that you provide in the Start/Stop Details tab must also be specified in the jrunusers.xml file for both the administrator and ColdFusion server instances. The jrun-users.xml file is located in the \runtime\servers\|\SERVER-INF directory.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Working with Server Manager • ColdFusion Application Name (Name of ColdFusion application deployed on WebSphere.) • Admin Port (port number for accessing the deployed WAR file, which is typically the administrator server port) JBoss specific parameters For JBoss, deploy the jbossappstartup.war file on JBoss server. The start/stop operations work only when secure access of JNDI over HTTP is enabled.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Working with Server Manager View diff of two server settings You can find out the differences in configuration of two server instances or clusters using the Diff With option available with Server Manager. This option allows you to check for differences in the configuration settings of two server instances. You can run Diff With on any two servers with the Logged In status. To run Diff With: 1 Right-click any one of the servers that you need to run Diff With on.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Working with Server Manager Apply configuration settings on multiple servers The left-pane of Server Manager lists the settings that you can configure for one or more ColdFusion servers. To apply configuration settings on multiple ColdFusion servers: 1 Configure the settings for one ColdFusion server using the settings available in the left-pane of the Server Manager. 2 Select the other ColdFusion servers to which the settings have to be applied.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Working with Server Manager Settings Actions Server Edit and refresh the server settings by right-clicking the setting in the left pane. Request Tuning Edit and refresh the request tuning configuration by right-clicking the setting in the left pane. Logging Edit and refresh the log settings by right-clicking the setting in the left pane. Note: To edit any settings, first refresh them to fetch the latest setting and then edit them.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Working with Server Manager • Stop batch operations on error: This check box is selected by default. If you deselect this check box, Server Manager continues to perform the batch operations even if an error occurs. Batch operations include tasks such as applying hot fix, clearing template cache, fetching settings from server, or applying settings from one server to multiple servers.
116 Chapter 11: Introducing Verity and Verity Tools ColdFusion includes Verity search technology that lets you quickly search databases; and create, index, diagnose, and manage collections. Collections and the ColdFusion Verity architecture ColdFusion includes Verity K2 Server search technology. Verity K2 Server is a high-performance search engine designed to process searches quickly in a high-performance, distributed system. The K2 search system has a clientserver model.
117 CONFIGURING AND ADMINISTERING COLDFUSION 9 Introducing Verity and Verity Tools Verity information storage Verity Search Server runs as a separate process from ColdFusion.
118 CONFIGURING AND ADMINISTERING COLDFUSION 9 Introducing Verity and Verity Tools About the Verity utilities ColdFusion includes several Verity utilities to diagnose and manage your collections. These tools include the mkvdk, rcvdk, rck2, and vspider utilities. The following table describes the relationship between the major Verity utilities and the corresponding cfcollection, cfsearch, and cfindex ColdFusion tags.
119 Chapter 12: Indexing Collections with Verity Spider Use the Verity Spider utility to index documents on your website and build collections that are searchable by the user. About Verity Spider Verity Spider enables you to index web-based and file system documents throughout your enterprise. Verity Spider lets you index more than two hundred application document formats, including Microsoft Office, WordPerfect, ASCII text, HTML, SGML, XML, and PDF (Adobe Acrobat) documents.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Flow control When indexing websites, Verity Spider distributes requests to web servers in a round-robin manner. This means that one URL is fetched from each web server in turn. With flow control, a faster website can finish before a slower one. The Verity Spider optimizes indexing on every web server. Verity Spider adjusts the number of connections per server depending on the download bandwidth.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider vspider -initialize -collection coll [options] Where -initialize is -start or -refresh (when starting points have changed), and -collection is required to provide a target for the Verity Spider, and [options] can be a near-limitless combination of the options described later.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Repository type Starting point Web The URL or URLs from which Verity Spider is to begin indexing. Use other options, such as the -jumps option, to control how far from the starting point Verity Spider goes. File The starting directory or directories in which Verity Spider start indexing.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Note: Adobe recommends that you take advantage of the abstraction that this option offers. This option can greatly reduce user error in erroneously including or omitting options in subsequent indexing jobs. -collection Specifies the full path to the collection to create or update. Note: You receive an error if you specify a filename with an extension of CLM. Meta collections are not supported.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -abspath Type File system only Generates absolute paths for files. Use this option when the document locations are not going to change, but the collection might be moved around. When you index a web server's contents through the file system, use the -prefixmap option with the -abspath option to map the absolute file paths to URLs. See also “-prefixmap” on page 127.
125 CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Specifies the maximum amount of memory, in kilobytes, used by each indexing thread. Specify the number of threads with the -indexers option. By default, each indexing thread uses as much memory as is available from the system. -maxnumdoc Syntax -maxnumdoc num_docs Specifies the maximum number of documents to download or submit for indexing.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -nodupdetect Type Web crawling only Disables checksum-based detection of duplicates when indexing websites. URL-based duplicate detection is still performed. By default, a document checksum is computed based on the CRC-32 algorithm. The checksum combined with the document size is used to determine if the document is a duplicate. See also “-followdup” on page 134.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Note: Do not run more than one Verity Spider process in persistent mode. As the Verity Spider is a resource-intensive process, only run it in persistent mode with an interval of less than one day. For time intervals greater than 12 hours, use some form of scheduling. Some examples are cron jobs for UNIX, and the AT command for Windows server. -preferred Type Web crawling only Syntax -preferred exp_1 [exp_n] ...
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider See also “-abspath” on page 124. -processbif Syntax -processbif 'command_string !*' Specifies a command string in which you can call a program or script that operates on BIFs generated by Verity Spider. Due to the use of special characters, which represent the bulk insert file (BIF), run Verity Spider with a command file using the -cmdfile option.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Note: Although larger values mean more efficient processing by the indexer, smaller values allow more parallelism on multi-CPU systems. If an outage occurs during indexing, a smaller value means that fewer documents are lost. If an outage occurs during indexing, the chunk of documents specified by the -submitsize option is lost because no transactional rollback occurs for indexing.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Specifies the maximum number of simultaneous socket connections to make to websites for indexing. Each connection implies a separate thread. The default value is 6. Note: The Verity Spider dynamic flow control makes the most use of all available connections when indexing websites. If you are indexing multiple sites, you might want to increase this number.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -noflowctrl Type Web crawling only Disables round-robin indexing of websites with network flow control. By default, Verity Spider uses round-robin indexing of websites to avoid overwhelming a web server and to improve indexing performance. Verity Spider connects to each web server in a round-robin manner, using up to the value for the -connections option. This means that one URL is fetched from each web server, in turn.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -proxyauth Type Web crawling only Syntax -proxyauth login:password Specifies login information for proxy server connections that require authorization to get outside the firewall. Use this option with the -proxy option. Note: You must have valid Verity Spider licensing capability to use this option. Information Server V3.7 does not support retrieving documents for viewing through secure proxy servers.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -auth Syntax -auth path_and_filename Specifies an authorization file to support authentication for secure paths. Use the -auth option to specify the authorization file. The file contains one record per line. Each line consists of server, realm, user name, and password, separated by whitespace.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -followdup Specifies that Verity Spider follows links within duplicate documents, although only the first instance of any duplicate documents is indexed. You might find this option useful if you use the same home page on multiple sites. By default, only the first instance of the document is indexed, while subsequent instances are skipped.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider The default value is unlimited. If you see large numbers of documents in a collection where you do not expect them, consider experimenting with this option, with the Content options, to pare down your collection. -nodocrobo Specifies to ignore ROBOT META tag directives. In HTML 3.0 and earlier, robot directives could only be given as the file robots.txt under the root directory of a website. In HTML 4.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -pathlen Syntax -pathlen num_pathsegments Limits indexing to the specified number of path segments in the URL or file system path. The path length is determined as follows: • The host name and drive letter are not included. For example, www.spider.com:80/ or C:\ is not included in determining the path length. • All elements following the host name are included.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -reparse Type Web crawling only Forces parsing of all HTML documents already in the collection. Specify a starting point with the -start option when you use the -reparse option. You can use the -reparse option when you want to include paths and documents that were previously skipped due to exclusion or inclusion criteria. In Verity Spider, make sure that you change the criteria while using the -cmdfile option.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -exclude Syntax -exclude exp_1 [exp_n] ... Specifies that files, paths, and URLs matching the specified expressions are not followed.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Note: When specifying a URL, use full, absolute paths using the same format that appears in the HTML hypertext link. If the link is relative, change it to absolute to use it with the -include option. See also “-regexp” on page 128. -indexclude Syntax -indexclude exp_1 [exp_n] ... Specifies that the files and paths in URLs that match the expressions are not indexed. They are, however, still followed.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider '/my_doc*/year199?' In Windows, include double-quotation marks around the argument to protect the special characters, such as the asterisk (*). On UNIX, use single-quotation marks. This is only required when you run the indexing job from a command line. Quotation marks are not necessary within a command file (the -cmdfile option). To use regular expressions, also specify the -regexp option.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider The -mimeinclude option does not let you index desired documents if the starting URL is not followed. For the MIME variable, you can include the asterisk (*) wildcard for text strings; for example: 'text/*' In Windows, include double-quotation marks around the argument to protect the special character (*). On UNIX, use single-quotation marks. This is only required when you run the indexing job from a command line.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Example 2 To avoid indexing directory listing pages, while still parsing the document and path links except for the link to the parent directory, use one of the following, depending on the web server being indexed: 1 For Netscape web servers, use the following: -indskip title "*Index of*" -nofollow "*parent directory*" 2 For Microsoft Internet Information Server, use the following: -indskip a "*to parent directory*" -nofoll
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider If you use the y override flag, the value for the custom meta tag overrides the value for the valid field, even if both values are present and differ. This can be useful when the valid field value is always sent, but you want to specify your own value with a custom meta tag. If you use the n override flag, the value for the custom meta tag is used only if there is no value for the valid field returned by the server.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider The default is to index documents of any sizes. -skip Type Web crawling only Syntax -skip HTML_tag "exp" Specifies that Verity Spider not index any HTML document that contains the text of exp within the given HTML_tag. For multiple HTML_tag and exp combinations, use multiple instances of the -skip option.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Specifies the character map to use. Valid values are 8859 or 850. The default value is 8859. -common Specifies the path to the Verity home directory, cf_root/verity/k2/common. Note: This option is typically not needed, as long as the PATH environment variable is set correctly. -datefmt Syntax -datefmt format Specifies the Verity import date format to use. Valid values are MDY (the default), DMY, YMD, USA, and EUR.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider -loglevel Syntax -loglevel [nostdout] argument Specifies the types of messages to log. By default, messages are written to standard output and to various log files in the subdirectory named /log beneath the Verity Spider job directory. If you add nostdout to the -loglevel option, messages are not written to standard output. Log files, however, are still created.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Maintenance options The Verity Spider maintenance options are: -nooptimize Prevents Verity Spider from optimizing the collection, thus reducing processing overhead during indexing. Use this option sparingly, as it leaves the collection in less than optimum shape.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider text/* The following value is NOT a valid substitute for text/html: text/h* Multiple parameter values If you use quotataion marks while specifying a series of parameter values for a single instance of a MIME type critera, enclose each separate parameter value in single-quotation marks.
149 CONFIGURING AND ADMINISTERING COLDFUSION 9 Indexing Collections with Verity Spider Indexing unknown MIME types Whenever you find MIME types being dropped, or you plan to index files whose extensions are not known to Verity Spider by default, use the -mimemap option to point to a file that contains your own custom mappings for filename extensions and MIME types.
150 Chapter 13: Using Verity Utilities Use Verity utilities to configure, maintain, and troubleshoot Verity collections. Overview of Verity utilities The following command-line utilities are included with Adobe ColdFusion for performing various operations on Verity collections: Verity utility Description For more information mkvdk Create and maintain collections. See “Using the mkvdk utility” on page 150. rck2 Search K2 Server collections. See “Using the rck2 utility” on page 159.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Multiple options and dockeys can be included, as needed. If dockey is a list of files, it should consist of an at sign (@) followed by the filename that contains a simple list of files (for example, @filelist). For more information about the options for the mkvdk utility, see “Getting started with the Verity mkvdk utility” on page 151.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Where: • Brackets ( [ ] ) indicate optional items. • An ellipsis (...) indicates repetition of the previous item. Thus, [filespec] [...] indicates an optional series of filespec items. • filespec represents a document filename or a list of document filenames. If filespec is a list of files, it should consist of an at sign (@) followed by the filename containing the list (for example, @filelist).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities General processing options The mkvdk utility provides the following general processing options: Option Description -collection path Specifies the path of the collection to create or open. This option is required to execute the mkvdk utility. -nolock Turns off file locking. Locking is on by default. -synch Performs work immediately. If this option is not used, indexing work is done in the background, as time permits.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Option Description -locale name Specifies the name of the Verity locale for the mkvdk utility. The locale name must correspond to the name of an existing locale directory, which must exist in the install_dir/common/locale directory. Valid options are english, deutsch, and francais. The default is english. -datefmt format Converts a date field value into Verity’s internal data representation.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Format variable Description MDY Dates written as month-day-year (US format, the default) DMY Dates written as day-month-year (European format) YMD Dates written as year-month-day (ISO international format) YDM Dates written as year-day-month (Swedish format) USA Dates written in US format (the same as MDY) EUR Dates written in European format (the same as DMY) Service-level keyword options The following table describes the vali
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Document processing options The mkvdk utility provides the following document processing options: Option Description -extract Extracts field values from documents, using the field extraction rules specified in the style.tde file. -insert Adds documents to the collection. This is the default option for the mkvdk command. -update Adds documents to the collection by replacing all previous information about the specified documents.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Option Description -backup dir Backs up the collection into the specified directory. The backup does not include the tde subdirectory. The tde subdirectory is created by and for Topic Document Entry if Topic Document Entry is used to create or maintain the collection. -repair Repairs the collection, performed by an API call.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Purging a collection in the background The following command purges the specified collection in the background: mkvdk -purge -purgeback -collection path Specifying persistent service The following command runs the mkvdk command as a persistent process, so that servicing is performed repeatedly after num idle seconds: mkvdk -persist -sleeptime num -collection path Deleting a collection The -purge option deletes all documents in a collection
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities You can safely squeeze deleted documents for a collection at anytime, because the mkvdk utility ensures that the collection is available for searching and servicing through its self-administration features. The application does not need to temporarily disable a collection to squeeze deleted documents, because when a squeeze request is made, the mkvdk utility assigns a new revision code to the collection.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Syntax element Description -server The server name for K2 Server to which to attach. The server name is defined in the k2server.ini file. The rck2 utility searches the collections attached to this server. -port The port number where K2 Server (specified by -server) is running.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities When you start the rcvdk utility with no arguments, you get the following message, followed by the rcvdk prompt: Type 'help' for a list of commands. RC> The help command produces the following list of available commands: RC> help Available commands: search s Search documents. results r Display search results. clusters c Display clustered search results. view v View document. summarize z Summarize documents.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Viewing results of the rcvdk utility After you have attached to a collection and issued a search command successfully, you can view the results list and look at the retrieved documents. You can use the options in the following table: Option Description r Displays the results list, starting with the first document. A maximum of 24 documents are displayed. rn Displays the results list, starting with the nth document.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Displaying more fields You can tell the rcvdk utility to display certain fields in the results list using the fields command, which is available in the expert mode. To go to the expert mode, enter x or expert at the RC prompt, then press Return. All fields in a column are blank if the field is not defined for the collection’s schema in the documents table (in style.ddd, style.sfl, or style.ufl).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Using the didump utility Using the didump utility, you can view key components of the word index per partition. The word list is a list of all words indexed by the Verity engine; the zone list is a list of all zones; and the zone attribute list is a list of the zone attributes found by the Verity engine. The didump executable, which starts the didump application, is located in the platform/bin directory.
165 CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities Viewing the zone list with the didump utility The zone list contains a list of the zones identified by the zone filter. You can search the zones listed using the Verity IN operator in a query. To view the contents of the zone list, use the didump utility with the -zones flag plus the path to a partition, like the following: didump -zones /z/collbldg/html/parts/00000003.
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities The columns in the display indicate the following: Size The number of bytes used by the Verity engine to store information about the zone attribute Doc The number of unique documents in which the zone attribute appears Word The total number of occurrences of a zone attribute for the partition Using the browse utility A documents table is built for each partition in a collection.
167 CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities 2 Press Return twice to display the fields for the first document record. 3 Press Return to view the document fields for the next sequential record. The following partial display of the results of the browse command includes internal fields, used by the Verity search engine. An internal field name starts with an underscore character (_).
CONFIGURING AND ADMINISTERING COLDFUSION 9 Using Verity Utilities The utility reads srcCollection1, srcCollection2, and so on, and merges them into a single collection with the directory name given for newCollection If the directory name given for newCollection does not exist, it is created.
169 Chapter 14: Solr Server and Collections The Solr server instance runs as a separate server, which you can start or stop as a service. You can configure your Solr collection for indexing and search capabilities using ColdFusion Administrator. Solr collections You can create Solr collections using ColdFusion Administrator or by using tag.