NAME | SYNOPSIS | DESCRIPTION | EXTENDED DESCRIPTION | EXAMPLES | ATTRIBUTES | SEE ALSO | NOTES
site-path/conf/site_name.site.conf
The site instance configuration file contains directives that define the site's runtime behavior, and defines the identity and server resources used by a web site hosted by the server instance. This file defines properties such as the web site's canonical host name and aliases, the location of the configuration file, and the network connections available to the web site. It also defines the servlet engine settings for the web site. The location of httpd.site.conf is determined by the site_config directive in httpd.conf.
The following syntax rules apply to the httpd.site.conf file:
The pound sign (#) is a comment character. All characters from a # to the end of a line are ignored
White space is ignored in directive definitions.
Some directives accept a list of values. Separate multiple values by white space. If more than one line is required to list all values, escape all but the last newline with a backslash (\) at the end of the line.
Any value may optionally be enclosed in double quotes (").
All directives are grouped in blocks surrounded by curly braces ({ and }). Any amount of white space, newlines, or directive definitions may appear between an opening curly brace and its matching close, including directive blocks that also use matched curly braces to contain a definition.
The overall format of the file is a list of directives.
See the "Extended Description" for the syntax of all valid directives in each division.
Specifies the path in which the server will look for ACLs for each web site hosted by the server instance. Path can be either absolute or relative to site_path. The default is "conf/access.conf".
Enables Microsoft FrontPage support.
Sets the caching policy used by intermediate caching proxies. The "public" setting allows the cache to be shared with other proxies. The "private" setting allows the files to be cached, but the cache can not be shared with other proxies. The "no_cache" setting does not allow the cache to be shared with other proxies. The default is "public."
Enables or disables the REMOTE_HOST CGI environment variable to be set and to be available to CGI scripts. REMOTE_HOST requires a DNS lookup of the IP address (REMOTE_ADDR) of the resource making the CGI request. Since DNS lookups can be resource consuming, allowing such DNS lookups can slow performance, especially on a server that uses extensive CGI. If you use getRemoteHost() or getRemoteAddr() or similar calls in your servlet programs requiring name resolution, cgi_dns_enable must be set to "yes" on both the server and the web site level. If you change this directive, you must restart the server in order for your change to take effect. The default is "no".
Enables or disables the authority to execute CGI scripts for the host defined by the url {} block. If enabled, resources in the CGI directory can be accessed through URLs of the form http://hostname/cgi-bin/ and executed as CGI scripts. If enabled and cgi_suffix_enable is also enabled, then any file with a .cgi extension can be executed as a CGI script. Individual sites can override this server setting. The default is "no".
Sets the maximum age, in minutes, for CGI error log files for the current host. If a CGI error log is older than the number of cgi_error_log_cycle_time minutes, then a new request log file is started with an incremented sequence number. If a log file contains no entries, then no new log file will be generated regardless of how much time has passed. The log cycle time can be specified in days, hours, or minutes. For example, a log cycle time of 24 hours can be 1,0:0 (1 day), 24:0 (24 hours), or 1440 (1440 minutes). Default is 1 day.
Enables or disables CGI script error logging. The default is no.
Sets the maximum number of CGI error log files that SunTM WebServerTM will keep for this host. Log files end with a sequence number suffix which is incremented when a new log file is created. If the sequence goes beyond cgi_error_log_max_files, it is reset to 1 and the first CGI error log file is overwritten. This prevents the number of log files from growing without limit. Set cgi_error_log_max_files to "-1" to have no limit on the number of log files. Default is 7 files.
Sets the maximum file size, in bytes, for CGI error log files for the current host. If a CGI error log exceeds cgi_error_log_max_file_size, a new log file is started with an incremented sequence number. Default is 1048576 bytes (1 MB).
Sets the directory and log file name prefix for CGI script error logs for a given host. The string can have either an absolute or a relative path followed by the prefix that will be used for this host's log files. Separate virtual hosts must have different prefix names so that there is no conflict in writing to the logs. Each host's log files will have a name in the form:
<pathname>/prefix.<sequence>
For example, <site_path>/logs/error_log.2. Sequence is incremented and a new file created whenever cgi_error_log_cycle_time or cgi_error_log_max_file_size is reached. If a log file contains no entries, then no new log file will be generated regardless of how much time has passed. Default is "logs/error_log".
Allows or disallows any file with a .cgi extension to be executed as a CGI script. This can allow users to create CGI without having access to /cgi-bin, and the Sun WebServer administrator has no control over what CGI the server is executing. This is a potential security risk, so consider which .cgi files may be put on your system before enabling this feature. Enabling both user_doc_enable and cgi_suffix_enable is generally risky since it allows any user to execute arbitrary .cgi files through Sun WebServer. Default is "no".
Sets the user name that will be used to run CGI scripts. By setting the cgi_user, you can control which files and services CGI scripts can affect. The cgi_user must have execute permission for scripts in a host's /cgi-bin directory. Default is "nobody".
Specifies the path to the file containing the content for meta data. Path can be either absolute or relative to site_path. Default is "conf/content.conf".
Allows or disallows MD5 checksum to be sent with the response entity. Default is "no".
Sets the name of the file Sun WebServer will look for in a directory when a URL request does not name a specific file. For example, if the URL request is for http://hostname/, Sun WebServer will look at the top directory of the host name's doc_root for a file specified as the default_file.
If default_file does not appear in the configuration file, then "index.html" is used. If default_file is set to an empty string (""), then no default file is used. If multiple files are specified, then the files are used in the specified order.
If no file matching the values for default_file is found, the directory contents will be listed, subject to the value of directory_listing.
The built in server-wide default is "index.html". The listings are in order of preference.
Specifies how the contents of directories will be listed if no file matching default_file is found in the directory.
Displays directory contents with each name as a hyperlink to the file, icons matching each file's type, and file size and date information. The icons used and the association of icons to file suffixes is configurable.
Displays only each file name as a hyperlink to the file itself.
Disables displaying directory contents; a HTTP "404 Not Found" error is returned to the client instead.
The built-in server-wide default is "fancy".
Sets the top-level directory available to the host for serving web documents. Except for special cases (such as /cgi-bin and users' personal directories), Sun WebServer will only have access to the file system at the doc_root and its subdirectories. This must be set for every host, but it does not have to be unique. You should create a new doc_root for your site.
Allows customized error messages to be returned to the client. Any valid URL, including CGI scripts, may be returned, so you have flexibility in what information you want to give clients when an error occurs. When an HTTP error code is returned, Sun WebServer will return an HTTP "302: Document Moved" header with a Location: header indicating the file to which the error has been remapped. Most clients will automatically fetch the URL named by the Location: header. You can redirect the following HTTP error codes:
400 - Bad Request (Remapped by default host only)
403 - Forbidden
404 - Not Found
412 - Precondition Failed
500 - Server Error
501 - Not Implemented
503 - Service Unavailable
error_document 503 "/cgi-bin/error.pl?503"
error_document 500 "http://www2.A.com/mirror/"
The path to which you remap 404 errors must be available in the document root. You can not redirect 404 errors to aliased directories.
special cases of alt_text = UP | DIR and file_type = ".." or "/"
Allows association of a file extension with an icon file. The icon will be used to represent all files with the extension in fancy directory listings. icon_add can also change a default association or assign icons to file types not covered in the default set; for example, you may want to use your own icons to represent basic types.
Specifies a string that will be used instead of an icon in text-only browsers. For example, "GIF".
Specifies a URI path relative to the default host (in the server {} block) or the host named by the current url {} block. For example, "/icons/binary.xbm".
Specifies a string of one or more file extensions or content type definitions that will use the icon in "fancy" directory listings.
In addition to file suffixes, you can customize the icon used for "parent directory" (../) and "subdirectory" by specifying "UP" or "DIR" as the alt text.
For example,
icon_add "IMG" "/sws-icons/image.xbm" "gif jpeg xbm" |
displays the icon in "/sws-icons/image.xmb" for "gif" "jpeg" and "xbm" files . In text-only browsers, the text "IMG" is displayed.
Sets the icon used for files with extensions that do not have a defined icon type. The path to the bit map file must begin with a (/), and it is relative to the default host or the host defined by the current url {} block.
Sets the maximum age for request log files for the current host. If a request log is older than the number of log_cycle_time minutes, then a new request log file is started with an incremented sequence number. If a log file contains no entries, then no new log file will be generated regardless of how much time has passed. The log cycle time can be specified in days, hours, or minutes. For example, a log cycle time of 24 hours can be 1,0:0 (1 day), 24:0 (24 hours), or 1440 (1440 minutes). Default is 1 day.
Sets the maximum number of request log files that Sun WebServer will keep for this host. Log files end with a sequence number suffix which is incremented when a new log file is created. If the sequence goes beyond log_max_files, it is reset to 1 and the first request log file is overwritten. This prevents the number of log files from growing without limit. Set log_max_files to "-1" to have no limit on the number of log files. Default is 7 files.
Sets the maximum file size, in bytes, for request log files for the current host. If a request log exceeds log_max_size, a new log file is started with an incremented sequence number. Default is 1048576 bytes (1 MB).
Sets the directory and log file name prefix for request logs for a given host. The string can have either an absolute or a relative path followed by the prefix that will be used for this host's log files. Separate virtual hosts must have different prefix names so that there is no conflict in writing to the logs. Each host's log files will have a name in the form:
<pathname>/prefix.<log_type>.<sequence>
For example, <site_path>/logs/http_log.elf.2. Sequence is incremented and a new file created whenever log_cycle_time or log_max_size is reached. If a log file contains no entries, then no new log file will be generated regardless of how much time has passed. Default is "logs/http_log".
Determines whether a given virtual host logs its IP address or DNS name into its log files. Default is "no" and the IP address is logged.
Sets the format for a host's request logs. Valid parameters are:
Disallows logging performed for this host.
Logs in common log file format, a format widely used by servers and analysis tools.
Logs in extended log file format.
Logs in extended common log file format; provides more fields than common log format.
Specifies the location of the web site's map file. Path can be either absolute or relative to site_path. For information on maps, see the man page for map.conf(4)Default is "conf/map.conf".
Sets the MIME type that will be used for files whose extension do not match any other MIME type. The default is "text/html".
Contains the default MIME types definitions used for the server host. Path is relative to site_path. Default is "mime.types".
If no MIME type for the file can be found, the mime_default_type is used. Entries in the mime_file have the form:
<media type>/<media subtype><file suffix(es)>
For example: text/html html htm The default server-wide mime_file is /etc/http/mime.types.
Allows or disallows HTTP methods PUT and DELETE. The default is "no".
If publish_enable is set to "yes," Sun WebServer implements HTTP PUT and DELETE requests by redirecting the requests to the executable script located in server_root/cgi-bin/publish_script. This CGI script provides the publishing support for the server. If you create your own publish_script, install it in this directory to replace the implementation provided. The original C source code is provided in /usr/http/src/put/putscript.c so that you can modify the code to suit your individual needs. In the sample server instance sws_server, the server root is /var/http/sws_server/, so the script is located in /var/http/sws_server/cgi-bin/publish_script.
If you enable publishing, you may want to use access control to restrict the users who can use PUT and DELETE methods. Otherwise, any user with access to the web site can modify it using PUT and DELETE. Because Sun WebServer handles many requests simultaneously, it is possible that a PUT or DELETE request is processed in a time interval that overlaps with a GET request for the same file. In some cases, the results of such a GET request may be truncated or contain no data. Subsequent requests (after the PUT and DELETE request has completed) will behave as expected.
Specifies path to the file containing realm information. Path can be either absolute or relative to site_path. Default is "conf/realms.conf".
Enables or disables the servlet engine. The default is "no".
Specifies the token which characterizes the request as a servlet request. Default is "/servlet".
Enables or disables the ability to use server-side include statements in .shtml files. May be set differently for each virtual host on the server. Default is "no".
Enables or disables the ability to use #exec server-side include directive. #exec will execute shell commands or CGI scripts, which may pose security risks and/or slow performance. Default is "no".
Specifies SSI file suffix. Default is ".shtml".
Allows any file in the document root with its executable bit set to be treated as a server-parsed HTML file. ssi_suffix can be "full" or "on" only if ssi_enable is "yes". If "full", Sun WebServer treats any file with the user or group executable bit set as server-parsed HTML, and it sends the file's Last-Modified time in the HTTP header if the user executable bit is set. If "on", Sun WebServer only treats files with the user's executable bit set as server-parsed HTML. Default is "off".
If cgi_suffix_enable is also enabled, Sun WebServer will check to see if an executable file is a CGI script before parsing it for server-side includes.
Follows or ignores symbolic links in the file system. Ignoring symbolic links may cause a performance loss as the file name and each directory in the path of a requested resource must be checked to make sure there are no symbolic links. Following symbolic links may be a security risk because a symbolic link can potentially point to a file that is outside of the doc_root. A symbolic link to a sensitive file (such as /etc/passwd) can only be made by someone with write access to the file, so the security risk is often small and easily managed by controlling who has access to the document root. Default is "yes".
Allows or disallows UNIX users to create personal HTML directories in their home directories. Default is "no".
See the "NOTESNOTES" section for information on user directories in a Solaris ISP Server environment.
Sets the directory name that users can create in their home directories for personal HTML files. When a request comes in for //server/~username/, Sun WebServer will look for files in ~username/<user_doc_root>/. Enables access. Default is "public_html".
See the "NOTESNOTES" section for information on user directories in a Solaris ISP Server environment.
Specifies the source of user information for user document directories if user_doc_enable is "yes." In most cases, the only valid value is UNIXSYS, and users are defined through the operating system (for example, in /etc/passwd or NIS).
In Solaris ISP Server, if virtual FTP servers have been defined in Sun Directory Services, you may set this to ISP. User information will be taken from the directory server, and the value of a user's ispContentDirectory will be used.
See the NOTESNOTES section for information on user directories in a Solaris ISP Server environment.
Specifies parameters of the servlet engine
Enables or disables servlet chaining. This enables the servlet engine to run a sequence of servlets in a specified order to fulfil one single servlet request. Host administrators can specify a chain of servlets to be executed sequentially. Default is "yes".
Specifies the value of the comment field in cookies with session IDs. Default is "Sun Web Server Session Tracking Cookie".
Specifies the domain where cookies with session IDs are valid. For example, if a cookie has a domain of "www.A.com", then only "www.A.com" will recognize it as a valid cookie. All other servers will reject this cookie.
Specifies the value of the max-age field sent for cookies with session IDs. A cookie with cookie_max_age 0 expires immediately.
Specifies the name of a cookie used to carry the session ID when cookies are enabled. Default is "swssessionid".
Specifies the value of the path field sent for cookies with session IDs. This allows you to set the URL path within which the cookie is valid. Pages outside of this path cannot read the cookie. This path is relative to site_path. Default is "/".
Specifies the value of the secure field sent for cookies with session IDs. This directive indicates whether a cookie should only be used under a secure server condition, such as SSL. Default is "no".
Allows the specified servlets access to dynamic libraries. Default is "local".
Allows specified servlets to have access to file resources, for example, read/write a file on local disk. Default is "local".
Allows specified servlets to have access to network resources e.g. open a socket. Default is "local".
Allows or disallows the servlets to reload. If the servlet classfile changes, a servlet instance (reflecting the changes) can be reloaded. Reloading can be performed by either the server or the host administrator, depending on whether the hosts are sharing a servlet engine instance. The default is "yes".
Enables or disables remote servlets. Enabling remote servlets allows the servlets from remote sites to be loaded by the server. The default is "yes".
Path to the "servlets.properties" file. Each servlet engine instance can have a list of preloaded servlets that it wishes to load and initialize as soon as the server starts. This list is specified in a servlet properties file. Path can be either absolute or relative to site_path. Default is "conf/servlets.properties".
Specifies the path to all loadable local servlets. This is a colon separated list of directories and jar files where the servlet engine will look for servlets (for example, /directory/directory:/directory/directory). Default is "site_path/servlets".
Enables or disables the servlet error logging. The default is "no".
Sets the maximum age for servlet error log files for the current host. If a servlet error log is older than the number of se_log_cycle_time minutes, then a new servlet error log file is started with an incremented sequence number. If a log file contains no entries, then no new log file will be generated regardless of how much time has passed. The log cycle time can be specified in days, hours, or minutes. For example, a log cycle time of 24 hours can be 1,0:0 (1 day), 24:0 (24 hours), or 1440 (1440 minutes). Default is 1 day.
Sets the maximum number of servlet error log files that Sun WebServer will keep for this host. Log files end with a sequence number suffix which is incremented when a new log file is created. If the sequence goes beyond se_log_max_files, it is reset to 1 and the first servlet error log file is overwritten. This prevents the number of log files from growing without limit. Set se_log_max_files to "-1" to have no limit on the number of log files. Default is 7 files.
Sets the maximum file size, in bytes, for servlet error log files for the current host. If a servlet error log exceeds se_log_max_file_size, a new log file is started with an incremented sequence number. Default is 1048576 bytes (1 MB).
Sets the directory and log file name prefix for servlet error logs for a given host. The string must have either an absolute or relative path name followed by the prefix that will be used for this servlet engine's log files. Separate servlet engines must have different prefix names so that there is no conflict in writing to the logs. Each servlet engines' log files will have a name in the form:
<pathname>/prefix.<sequence>
For example, <site_path>/logs/se_log.2. Sequence is incremented and a new file created whenever se_log_cycle_time or se_log_max_file_size is reached. If a log file contains no entries, then no new log file will be generated regardless of how much time has passed. Default is "logs/se_log".
Allows the specified servlets to have access to security resources, for example, classLoaders. The path must be an absolute path. Default is "none".
Specifies whether to send authorization headers to servlets. Authorization headers hold information about client authentication such as encoded user name and password. Default is "no".
Specifies the length of time that a sesssion is allowed to remain unused before it is invalidated. Default is 30 minutes.
Specifies the number of sessions allowed to remain in memory. If the number of sessions exceeds this number, then sessions are swapped out to disk (beginning with the least-recently used session) to reduce the number of resident sessions. Default is 4096.
Specifies whether session ID is added to URLs when URL dictates a switch from "http" to "https" or vice-versa. Used only in servlet URL rewriting. Default is "no".
Specifies the directory path where the swapped sessions reside. The path can be either absolute or relative to site_path.
Specifies the initial number of instances of a single servlet to be spawned in the case of SingleThreadModel servlets. Default is 5.
Specifies the maximum number of instances of a single servlet to be spawned in the case of SingleThreadModel servlets. Default is 20.
Allows or disallows the specified servlets to have access to system resources, for example, call System.Exec(). Default is "local".
#
# Copyright (c) 1998, by Sun Microsystems, Inc.
# All rights reserved.
#
# Sun WebServer Site Configuration
url {
doc_root /var/http/sws_server/websites/www.A.com/public
log_type eclf
user_doc_enable yes
map_file conf/map.conf
realm_file conf/realms.conf
access_file conf/access.conf
content_file conf/content.conf
# If you need more than the global mime types in
# /etc/http/mime.types, create this file:
#
# mime_file conf/mime.types
se_enable yes
servlet_token "/servlet/"
servlet_engine {
properties_file /var/http/sws_server/websites/\\
www.A.com/conf/servlets.properties
servlets_path //var/http/sws_server/websites/\\
www.A.com/servlets/
se_log_prefix "/var/http/logs/A.com_se_log"
se_log_enable yes
se_log_max_files 7
se_log_max_file_size 1048576
se_log_cycle_time 1,0:0
reload_enable yes
remote_enable yes
chaining_enable yes
network_access_enable local
file_access_enable local
dynamic_linking_enable local
system_access_enable local
security_access_enable local
session_swap_directory "/tmp/sessionSwap"
session_max_residents 500
cookie_name "specialSessionId"
cookie_comment "Session Tracking Cookie"
}
}
See attributes(5) for descriptions of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| Availability | SUNWhttpc |
| Interface Stability | Evolving |
If you are running on the SolarisTM ISP ServerTM software, user information (including user content directories) can be accessed through LDAP and Sun Directory Services.
To use LDAP for user content directories, a virtual FTP site matching the Sun WebServer web site (virtual host) must exist in the Directory Services. Refer to the SunTM Internet FTP Server 1.1 online help for information on creating virtual FTP sites.
If user_doc_source is set to "ISP," Sun WebServer will attempt to map ~user URLs to the value of ispContentDirectory in Sun Directory Services.
The ispContentDirectory is relative to the ispRootDirectory defined in the ispService entry for a virtual FTP site. The file system directory must be readable and writable by either the uidNumber or gidNumber defined in a subscriber's entry in the directory service.
When the CGI and servlet logs are enabled, they capture output from the standard error streams of CGI scripts and servlets in cycled log file sets that Sun WebServer manages. Enabling these logs can impair Sun WebServer's throughput because scripts and servlets often use the log files for debugging messages which can flood the log files; this file system traffic can degrade performance on a heavily loaded web site. However, to debug CGI scripts and servlets, or to record all the CGI and servlet output, you must enable the error log. You can minimize the disk space requirements by carefully choosing the cycling parameters from the web site management screens in the Sun WebServer GUI.
All configuration parameters are editable through the Sun WebServer GUI. For administrators who use the command-line utilities or do not have access to the Sun WebServer GUI (for example, if the administrator is remote and does not have access through a firewall), there are some directives that can not be changed using the command-line utilities. These directives must be manually edited in the configuration files. In this case, the changes made directly in the configuration files may conflict with the edits from the GUI and the command-line utilities.
All non-servlet related directives (other than servlet_token) are not explicitly supported in the command-line utilities. If they are modified through an editor, then the synchronization of file writes are handled through UNIX (outside of the file locking mechanism used by both the administration and the command-line utilities). This could lead to file inconsistencies not encountered if one performed management exclusively through the Sun WebServer GUI.
NAME | SYNOPSIS | DESCRIPTION | EXTENDED DESCRIPTION | EXAMPLES | ATTRIBUTES | SEE ALSO | NOTES