UNIX and Linux versions of Chili!Soft ASP include a configuration file, casp.cnfg, in which you can change Chili!Soft ASP settings. This topic describes the settings and their parameters.
Important Note
If you make any changes described in this section without prior authorization from Chili!Soft Customer support, you might void your eligibility for technical support.
Most of the configuration settings described in this section are easily accessed from the Chili!Soft ASP Administration Console. You can create serious problems with your system by configuring your computer in the manner described in this section. It is highly 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-[WEB_SERVER]-[PORT]
where [C-ASP_INSTALL_DIR] is the path name of the Chili!Soft ASP installation directory, [WEB_SERVER] resembles apache, netscape, or zeus, 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. In order 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 Chili!Soft ASP Servers. The parameters specified in this section affect all Chili!Soft ASP Servers.
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-process mode, the ASP Server uses ports portnumber through portnumber + maxprocesses (defined under the [default computer] keyword). If you are running five server processes, you need six IP ports. In multi-threading mode, the ASP Server uses only two ports.
logfile
Defines the name and location of the ASP Server status log file.
mtengine (1/0)
Controls multi-threading in the ASP server. If mtengine is set to 0, the ASP Server uses multiple processes to serve ASP requests. If mtengine is set to 1, the ASP Server runs one process with multiple threads to serve requests. Multi-process servers tend to be more stable because an error only affects a single ASP Server process, but it might take longer to access variables stored in the Application object. Multi-threaded servers tend to be less robust, but can improve access time for variables stored in the Application object because all Application object variables are stored in process space available to all threads.
disablerestart
This setting is useful for Chili!Soft ASP diagnostics. If set to 1, the Chili!Soft ASP parent process does not automatically re-spawn 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 Chili!Soft ASP hash object.
The [default machine] keyword defines a section containing parameters that control the operation of the ASP Server on each computer.
license
The absolute path name of the directory containing the Chili!Soft ASP license file.
caspd_pid
(Optional) The name and location of the process ID (PID) file for the Chili!Soft ASP daemon.
maxprocesses (1 to 20)
The maximum number of ASP Server threads or processes (depending on the mtengine setting) 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 a Netscape or Zeus Web server, be sure to read "Important Security Information."
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 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 casp.cnfg file [default machine] section (as discussed next).
· Defined User Security mode. This mode is available on 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.
- Netscape and Zeus Web servers do not support Inherit User Security mode. To protect the security of your server, you should set inherit_user=0, and then specify a user or group in casp.cnfg for the ASP Server to run under.
Note
On UNIX-based systems, you must run the ASP Server in multi-process mode for this feature to work. (The ASP Server always runs in multi-process mode on Linux.)
For more information, see "Securing the Server" in this chapter.
javasupport (yes/no)
"Yes" enables Java support, 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 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.
Note
You must run the ASP Server in multi-threaded mode for this feature to work.
group
(Optional) The group name for the account under which the ASP Server runs. Make sure that this group has permission to open 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.
Note
You must run the ASP Server in multi-threaded mode for this feature to work.
[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 be either vbscript or jscript.
connectionpoolsize
The number of ADO connections to pool (reuse) 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 64000. If the data you pass to a database exceeds this limit, the ODBC driver might crash. You can increase this value as needed.
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.
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 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 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.
(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.
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 timeout 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 2001 Sun Microsystems, Inc. All rights reserved. Legal Notice.