Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

Editing the Sun Chili!Soft ASP Configuration File

UNIX and Linux versions of Sun Chili!Soft ASP include a configuration file, casp.cnfg, in which you can change Sun Chili!Soft ASP settings. This topic describes the settings and their parameters.

Caution

Take great care when making the changes described in this section. Changes you make could require a complete reinstall of Sun Chili!Soft ASP, and could void your eligibility for customer support. You should back up your data before making any changes.

Most of the configuration settings described in this section are easily accessed from the Sun Chili!Soft ASP Administration Console. It is strongly recommended that you use the Administration Console whenever possible, as described in "Using the Administration Console" in this chapter.

You can find the casp.cnfg file in the following location:

/[C-ASP_INSTALL_DIR]/asp-server-[PORT]

where [C-ASP_INSTALL_DIR] is the path name of the Sun Chili!Soft ASP installation directory, and [PORT] is the ASP Server port number (resembles 3000).

You can open casp.cnfg in any text editor and make the changes you want. For the changes to take effect, you must restart the ASP Server, as described in "Stopping and Restarting the ASP Server" in this chapter.

The casp.cnfg file is divided into sections by keywords. The following sections describe the keywords and parameters for each section.

[machines]

The [machines] keyword defines the computers that are running the Sun Chili!Soft ASP Server. The parameters specified in this section affect all Sun Chili!Soft ASP Servers.

Parameters

count

The number of computers running the ASP Server.

machine1 ... machineN

The IP address of each computer running the ASP Server. The number of entries should be the same as the number of computers running an ASP Server.

portnumber

The base IP port to which the ASP Server control process listens. In multi-threading mode, the ASP Server uses two ports.

logfile

Defines the name and location of the ASP Server status log file.

mtengine (1)

Controls multi-threading in the ASP server. When mtengine is set to 1, the ASP Server runs one process with multiple threads to serve requests.

disablerestart

This setting is useful for Sun Chili!Soft ASP diagnostics. If set to 1, the Sun Chili!Soft ASP parent process does not automatically re-spawn Sun Chili!Soft ASP child processes that fail.

hashobj_pid

(Optional) This setting enables you to specify the name and location of the process ID (PID) file for the Sun Chili!Soft ASP hash object.

[default machine]

The [default machine] keyword defines a section containing parameters that control the operation of the ASP Server on each computer.

Parameters

license

The absolute path name of the directory containing the Sun Chili!Soft ASP license file.

caspd_pid

(Optional) The name and location of the process ID (PID) file for the Sun Chili!Soft ASP daemon.

maxprocesses (1 to 20)

The maximum number of ASP Server threads that are used to process pending ASP requests. The number specified can be between 1 and 20. I/O-heavy scripts run better with more processes.

inherit_user (1/0)

This setting enables you to specify the security mode under which the ASP Server runs and can have a serious impact on the security of your server. In particular, if you are running iPlanet Web Server or Zeus Web Server, be sure to read the following "Important Security Information" note.

The ASP Server can run with the permissions of the user defined for the Apache Web Server or virtual host, with the permissions of a user or group defined in the casp.cnfg file, or with root permissions. You can specify the mode as follows:

·   Inherit User Security mode. This mode, the default, is available only on Sun Chili!Soft ASP running with Apache Web Server. When inherit_user=1, the ASP Server runs with ("inherits") the permissions of the user defined for the Apache Web Server or virtual host as defined in the Apache configuration file. This is the case even if a different user or group is specified in the [default machine] section of the casp.cnfg file (as discussed next).

·   Defined User Security mode. This mode is available on Sun Chili!Soft ASP running with any supported Web server. In this mode, the ASP Server runs with the permissions of the user or group you specify. To run in this mode, set inherit_user=0 and then specify the user or group in the [default machine] section of casp.cnfg, as described later.

Important Security Information

When inherit_user=0 and no user or group is specified in the [default machine] section of casp.cnfg, the ASP Server runs as root. This can create a security risk for your server, so it is not recommended that you set inherit_user=0 unless you also define a user or group for the ASP Server to run under.

iPlanet and Zeus Web servers do not support Inherit User Security mode, even when when Inherit user security is set to yes in the Administration Console. To protect the security of your server, when running Sun Chili!Soft ASP with these Web servers, specify a user or group in casp.cnfg for the ASP Server to run under.

For more information about the inherit_user setting, see "Setting the Security Mode" in this chapter.

javasupport (yes/no)

Yes enables Java support, which is required for Chili!Beans. No, the default, disables Java support. Because Java support can affect server performance, it is a good idea to enable it only when using Chili!Beans.

Enablemonitoring (yes/no)

Yes, the default, enables creation of performance counter log files, as follows:

/tmp/.casp[PORT]/chili-psm

/tmp/.casp[PORT]/.pm-chili-psm

/tmp/.pm-chili-psm

/tmp/chili-psm

These files are created with permissions that might not be appropriate in a shared Web hosting environment. No disables performance monitoring and the creation of these files.

user

(Optional) The username for the account under which the ASP Server runs. Make sure that this user has permission to open Sun Chili!Soft ASP configuration files such as casp.cnfg and odbc.ini. The user starting the ASP Server by using caspctrl must have root permissions. If this attribute is not present and inherit_user=0, the ASP Server runs under the account of the user that started the ASP Server.

group

(Optional) The group name for the account under which the ASP Server runs. Make sure that this group has permission to open Sun Chili!Soft ASP configuration files such as casp.cnfg and odbc.ini. The user starting the ASP Server using caspctrl must have greater permissions than this group. If this attribute is not present and inherit_user=0, the ASP Server runs under the account of the user that started the ASP Server.

[default application]

bufferingon (yes/no)

Yes enables script buffering.

sessiontimeout

Amount of time in seconds that the ASP Server waits for a new page request before canceling the session.

scripttimeout

Amount of time in seconds the ASP Server waits for an ASP page to finish processing before canceling the request.

allowsessionstate (yes/no)

Yes enables the use of the Session object in ASP scripts.

enableparentpaths (yes/no)

No, the default, limits file system access by the FileSystemObject to the application directory and subdirectories, and disables the use of "../" syntax. Yes enables access to the file system by the FileSystemObject outside the ASP application directory and the use of "../" syntax in #include and Server.mapPath statements.

defaultlanguage

Specifies the default script interpreter. This value can either be vbscript or jscript.

[ado]

connectionpoolsize

The number of ADO connections to pool (re-use) to improve server performance. The default is 25. "0" disables connection pooling.

logpath

Absolute path name of the ADO errors log file. Specifying the path name enables logging. You cannot use the name of a file that already exists in the directory.

maxlongfieldlength

Maximum long field length in bytes. By default this value is 65535. If the data you pass to a database exceeds this limit, the ODBC driver might crash. You can increase this value as needed.

[applications]

The [applications] keyword defines a section in which to specify information on how the ASP Server handles ASP applications. There are several ways to define an ASP application on the ASP Server. For more information, see "Configuring ASP Applications" in this chapter.

Parameters

use_aliases

If use_aliases=yes, then any virtual directory or alias defined in the Web server configuration file is treated as an ASP application. If use_aliases=no, then the virtual directories or aliases defined in the Web server configuration file are not treated as ASP applications by the ASP Server.

/caspdoc

Absolute path name of the directory containing the Sun Chili!Soft ASP product documentation.

/caspadmin

Absolute path name of the directory containing the admin files.

/caspsamp

Absolute path name of the directory containing the Sun Chili!Soft ASP samples.

config_name

(Optional) This parameter enables you to specify the name of the ASP User Configuration file. Any applications defined in this file are dynamically recognized by the ASP Server without requiring the ASP Server to be restarted. If config_name=.aspconf, for example, the ASP Server looks for this filename in the document root directory of the Web server. Entries in the config_name file should use the following format:

/[appname]

There are two limitations on applications defined in the ASP User Configuration file. First, the files in the application must be located within the document root of the Web server. Second, the directory containing the global.asa file must not be below the top-level directory of the Web server document root directory.

/appname

(Optional) To define an ASP application on the ASP Server, use the following format:

/[appname] = "/[path_name]" (the path name must be enclosed in double quotes).

where [appname] is the name specified for the application and [path_name] is the absolute path name of the directory containing the application files. If no applications are defined in the [applications] section, then the ASP Server treats the root directory of the Web server as the location of the "default" ASP application.

[virtual hosts]

(Optional) The [virtual hosts] keyword defines a section in which to configure the ASP Server to work with the virtual hosts feature of Apache Web Server. For more information, see "Defining Applications on UNIX," "Enabling ASP for a Virtual Host," and "Defining Applications in a Shared Environment" in this chapter.

Parameters

allow_all

(Optional) If allow_all=no, then ASP functionality is only enabled for the virtual host defined later in the [virtual hosts] section. If this attribute is omitted (or if allow_all=yes), ASP is enabled for all of the virtual hosts defined in the Web server configuration file.

timeout

(Optional) If a virtual host has had no ASP activity for the number of minutes specified in the timeout attribute, the ASP Server releases all of the cached ASP pages for that virtual host. The ASP Server does not time out a virtual host unless all of the sessions for that virtual host have timed out. If this setting is not configured, the default timeout is 60 minutes.

hostID(s)

(Optional) This setting applies only to Apache Web Server. It is a line-delimited list of hostnames that identify which virtual hosts are allowed to handle requests for ASP pages. The hostname(s) listed in this section should match the virtual hosts ServerName directive in the httpd.conf file of the Apache Web Server. This attribute becomes active if allow_all=no. If allow_all=no and no hostIDs are provided, ASP functionality is disabled for all virtual hosts.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.