This manual page summarize the core features of the server not being implemented as EWSAPI modules. The following core config directives are described:
The SSL support is realized using the SSLeay
package. Please refer to ssl(3)
.
SSLeay is an implementation of Netscape's Secure Socket Layer specification - the software encryption protocol specification behind the Netscape Secure Server and the Netscape Navigator Browser.
The SSL Protocol can negotiate an encryption algorithm and session key as well as authenticate a server before the application protocol transmits or receives its first byte of data. All of the application protocol data is transmitted encrypted, ensuring privacy.
The SSL protocol provides "channel security" which has three basic properties:
The SSL mechanism can be enabled in the server by using the SSLCertificateFile, SSLCertificateKeyFile and the SSLVerifyClient config directives.
Files delivered to the client are MIME typed according to RFC 1590. File suffixes are mapped to MIME types before file delivery.
The mapping between file suffixes and MIME types are
specified in the mime.types
file. The mime.types
reside within the conf
directory of the ServerRoot. Refer to the example server
root (UNIX: $INETS_ROOT/examples/server_root, Windows: %INETS_ROOT%\examples\server_root
). MIME types may be added as required to the
mime.types
file and the DefaultType config directive
can be used to specify a default mime type.
Syntax: BindAddress
address
Default: BindAddress *
Module: httpd_core(3)
BindAddress
defines which address the server will listen
to. If the argument is * then the server listens to all addresses
otherwise the server will only listen to the address
specified. Address can be given either as an IP address or a
hostname.
Syntax: DefaultType
mime-type
Default: - None -
Module: httpd_core(3)
When the server is asked to provide a document type which
cannot be determined by the MIME Type
Settings, the server must inform the client about the
content type of documents and mime-type
is used if an
unknown type is encountered.
Syntax: DocumentRoot
directory-filename
Default: - Mandatory -
Module: httpd_core(3)
DocumentRoot
points the Web server to the document space
from which to serve documents from. Unless matched by a
directive like Alias, the
server appends the path from the requested URL to the
DocumentRoot
to make the path to the document, for
example:
DocumentRoot /usr/web
and an access to http://your.server.org/index.html
would
refer to /usr/web/index.html
.
Syntax: MaxClients
number
Default: MaxClients 150
Module: httpd_core(3)
MaxClients
limits the number
of simultaneous
requests that can be supported. No more than this number
of child server processes can be created.
Syntax: Modules
module module ...
Default: Modules mod_get mod_head mod_log
Module: httpd_core(3)
Modules
defines which EWSAPI modules to be used in a
specific server setup. module
is a module in the code
path of the server which has been written in accordance with the
EWSAPI
(Erlang Web Server API). The server executes functionality in
each module, from left to right (from now on called EWSAPI
Module Sequence).
Before altering the EWSAPI Modules Sequence please observe what
types of data each module uses and propagates. Read the "EWSAPI
Interaction" section for each module and the EWSAPI Module
Interaction description in httpd(3)
.
Syntax: Port
number
Default: Port 80
Module: httpd_core(3)
Port
defines which port number
the server should
use (0 to 65535). Certain port numbers are reserved for
particular protocols, i.e. examine your
OS characteristics (UNIX: /etc/services, Windows:
) for a list
of reserved ports. The standard port for HTTP is 80.
All ports numbered below 1024 are reserved for system use and regular (non-root) users cannot use them, i.e. to use port 80 you must start the Erlang node as root. (sic!) If you do not have root access choose an unused port above 1024 typically 8000, 8080 or 8888.
Syntax: ServerAdmin
email-address
Default: ServerAdmin unknown@unknown
Module: httpd_core(3)
ServerAdmin
defines the email-address
of the
server administrator, to be included in any error messages
returned by the server. It may be worth setting up a dedicated
user for this because clients do not always state which server
they have comments about, for example:
ServerAdmin www-admin@white-house.com
Syntax: ServerName
fully-qualified domain name
Default: - Mandatory -
Module: httpd_core(3)
ServerName
sets the fully-qualified domain
name
of the server.
Syntax: ServerRoot
directory-filename
Default: - Mandatory -
Module: httpd_core(3)
ServerRoot
defines a directory-filename
where the server has its operational home, e.g. used to store
log files and system icons. Relative paths specified in the
config file refer to this directory-filename
(See
mod_log(3)).
Syntax: SocketType
type
Default: SocketType ip_comm
Module: httpd_core(3)
SocketType
defines which underlying communication
type
to be used. Valid socket types are:
ip_comm
ssl
httpd(3)
).
Syntax: SSLCertificateFile
filename
Default: - None -
Module: httpd_core(3)
SSLCertificateFile
points at a PEM encoded
certificate. Read more about PEM encoded certificates in the SSL
application documentation. The dummy certificate
server.pem (UNIX: $INETS/examples/server_root/ssl/, Windows: %INETS%\examples\server_root\ssl\
), in
the Inets distribution, can be used for test purposes.
Read more about PEM encoded certificates in the SSL application
documentation.
Syntax: SSLCertificateKeyFile
filename
Default: - None -
Module: httpd_core(3)
SSLCertificateKeyFile
is used to point at a certificate
key file. This directive should only be used if a certificate
key has not been bundled with the certificate file pointed
at by SSLCertificateFile.
Syntax: SSLVerifyClient
type
Default: - None -
Module: httpd_core(3)
Set type
to:
Read more about SSL in the application documentation.
Syntax: KeepAlive
max-requests
Default: - Disabled -
Module: httpd_core(3)
This directive enables Keep-Alive support. Set max-requests
to
the maximum number of requests you want the server to serve per
connection. A limit is imposed to prevent a client from hogging your
server resources. To disable Keep-Alive support, do not set this
directive.
The Keep-Alive extension to HTTP, as defined by the HTTP/1.1 draft, allows persistent connections. These long-lived HTTP sessions allow multiple requests to be sent over the same TCP connection, and in some cases have been shown to result in almost 50% speedup in latency times for HTML documents with lots of images.
Syntax: KeepAliveTimeout
seconds
Default: - Disabled -
Module: httpd_core(3)
The number of seconds the server will wait for a subsequent request before closing the connection.