Web Server Properties
bind_address
This is the local address the WebServer will bind its server socket to. By default, the WebServer will bind to all available addresses.
bind_port
This property tells the WebServer what port to bind to and accept connections from. This is set to port 80 by default, the standard HTTP port.
log_requests
If this property is set to true, the WebServer will automatically log requests using a LoggerAgent. You must start a LoggerAgent in the same Agent Kernel as the WebServer if you want to log requests. WebServer log output is compatible with the Apache log file format. By default, this property is set to true.
max_connections
This property determines how many simultaneous connections the web server will handle. Any connection made after this number has been reached will hang for the thread_pool_timeout time or until another thread in the pool is freed. This property is set to 200 by default.
mime_types_file
This is the local file that the WebServer will read to supply its file extension to mime type mapping. This file should contain name=value pairs, each on a line of its own (for example: html=text/html). By default, this property is set to mime_types; however, if the file is missing, the Webserver will use a set of default mappings.
multi_home
This boolean property determines whether the WebServer will do multihoming of domains. By default this is set to false, but if it is set to true, the Webserver will use the hostname given by the requested URL to retrieve RequestAgents from the ServiceManager. This allows certain RequestAgents to only be accessed through certain websites. If the WebServer receives the request http://www.example.com/foo.agent, the WebServer will attempt to find foo.agent in the ServiceManager in this order:
http://www.example.com/foo.agent
http://www.example.com:80/foo.agent
www.example.com:80/foo.agent
www.example.com/foo.agent
/foo.agent
foo.agent
As long as a RequestAgent is registered in the ServiceManager as one of these names, the request can be served. If this property were false, only the last 2 names would be checked against the ServiceManager, the hostname of the requested URL will never be checked.
refuse_requests
This is a comma separated list of text that is used to match against the request URI. If the URI contains any of these Strings, the connection is immediately dropped and no response is given. The default value of this property is .cmd,.dll,.exe,cgi-bin (note that there are no spaces between the text and commas, as whitespace is also used in matching). So a request such as http://www.example.com/command.exe would be dropped. If you intend on serving files that contain these Strings, you will need to remove them from this property.
strict_http_version
If this property is set to true, the WebServer will only accept HTTP/1.1 requests. Any HTTP/1.0 requests will yield a 505 Version not supported response. By default, this property is set to false.
thread_pool_timeout
This property determines how long the server will wait for an available thread to
service a request when all the threads in the available pool are in use. The client browser will hang during this time until a thread becomes available to handle its request - if no threads become available during this time, an error is returned. By default, this property is set to 0, which causes the WebServer to wait indefinitely for a thread to free up. It will continually poll the ThreadPool every socket_initial_timeout milliseconds.
socket_initial_timeout
This property serves 2 purposes. The first is an initial read timeout. Upon a browser's connection to the WebServer, the browser will have this many milliseconds to start sending the first line of the HTTP request, otherwise the WebServer will immediately respond with a 408 Request timed out. The second use for this property is the polling time for a thread in the ThreadPool to free up. This property is set to 3000 milliseconds by default.
socket_timeout
After the WebServer receives the first line of a browser's HTTP request, the socket's timeout is set to this property. This timeout is meant to be far more lenient than the initial timeout, whose purpose is to prevent DOSing and idling clients. By default, this property is set to 30000 milliseconds.
max_uri_length
This is the maximum length of the first line of a request. The default value of this property is 512 characters. If the first line of the request exceeds this value, a 414 Request URI too long will be returned. If your agents require very long GET method cgi parameters, this property may need to be increased to accomodate the length of the parameters.
max_field_length
This is the maximum length of a field of the HTTP request. The default value of this property is 256 characters. If any field in the request exceeds this length, a 413 Request entity too long will be returned. If your agents require long request fields, such as large cookies, this property may need to be increased.
html_response_agent
This is an Agent that implements the HTMLResponseInterface. The WebServer will fetch this Agent from the ServiceManager to be used for returning HTML responses, like error messages and other common responses. By default this is set to none and the WebServer will use its build in default responses.
use_inet_address_methods
If this property is set to true, the WebServer will resolve IP addresses to their hostnames using the InetAddress class and store them in the 3 properties request_remote_host, request_remote_addr, and request_id in the AgentRequest before passing it to a RequestAgent, otherwise, these properties will not be set and the logs will not include hostname resolution, only the IP address. By default, this property is set to true. In the past, DNS resolution using the InetAddress methods sometimes causes extreme slowdowns and/or stray UDP sockets, which will lead to the WebServer running out of file handles. If you are experiencing these problems, try setting this property to false
cache_extensions
If set to true, the WebServer will cache the chains of Web Server Extensions used by each multi-homed domain. If the extensions are cached, then registering new ones or removing old ones after the WebServer is started and the extensions have been cached will not yield any effect. Set this to false if extensions are to be added and removed during runtime. By default, this property is set to true
service_name
This is the service name that the WebServer registers itself as. By defaul, this is WebServer-[port], where [port] is the port the webserver listens to.
Description: How to configure the webserver
Updated: Tue May 20 18:50:00 EDT 2008