Almost all functionality in Roxen exists in different modules.
Each module has a distinct task. Several modules can cooperate in the
creation of a page that will be sent to the user.
What task a module has is determined by its type. More complex
modules can be of several types and thus perform more than one task.
modules handles authentication of, and
information about, users. The most common type of Authentication
modules are modules that import the user database from the operating
system Roxen is running on. The information provided by an
Authentication module is often used by other modules, such as the
User Filesystem module. It is only possible to have
one Authentication module per virtual server.
modules deals with directory listings and index
files. If the requested resource is a directory, a directory module
either tries to find a suitable index file or to create a page with a
directory listing. It is necessary to have a Directory module in order
to get index files, such as index.html, to work. It is only
possible to have one Directory module per virtual server.
modules handle virtual files, with a
certain extension. Each time a request is made to a URL ending with
that extension, the extension module will be called. There are no
Extension modules in the Roxen distribution.
- File extension
modules deal with files with a particular
extension, such as .html or .gif. The file in
question must first have been delivered by a Location module. The
ISMAP image-maps module is a File extension
modules filter data that is just about ready to be
sent to the browser. This can be used, as the name suggests, to filter
out parts of the data that should not be sent.
- First try
modules are called before all other module
types, except for Authentication modules. This is used to catch
certain types of requests, for instance, to block access to your
server from certain IP addresses or to send a warning message to the
administrator if the server is accessed outside working hours.
- Last try
modules are called when all other modules have
failed to produce anything at all from the request. A Last try module
could give an elaborate error message.
modules deal with file systems, fetching files
and directories. A Location module could work with a real file system
or a purely virtual one. For example, it could fetch files from a
database instead of a file system.
Most web applications are also implemented as Location modules.
Pike and CGI scripts work much like a Location module.
Each Location module is mounted somewhere on Roxen's virtual
filesystem. Several Location modules may be mounted on overlapping
mount points. If the module have the same priority, the module with
the longest mount point will be called first. Thus a module mounted on
/schedule/server/ will be called before a module mounted on
modules perform some logging of information
about the requests. This could be done by writing log files or in some
other way. The Logging module decides whether the request has been
logged properly or whether the request should also be logged by the
built-in log system.
- The Main parser
module handles all RXML parsing. The
module handles the interface to Parser modules. A Main parser must be
installed for any RXML parsing to take place.
The Main parser must somehow get pages to parse. This is usually
done by making the module a File extension module as well. Thus all
files with a certain extension will be parsed.
There can only be one Main parser module in each virtual server.
The RXML 2.0 parser module is the only Main parser
module included in the Roxen distribution.
modules define one or more RXML tag. This is one of the most common
user created modules. Making new tags available is an excellent way of
making functionality available to the users of the server.
The Parser modules are called upon by a Main parser module. If no
Main parser module is installed in the virtual server, no RXML parsing
will take place.
modules set the protocols the virtual
servers can use. It handles a network connection to a port and then
sends the request on to Roxen. HTTP, HTTPS and FTP are examples
of protocol modules included in the Roxen distribution.
modules provides other modules with
different services and extra functionality. They do not in themselves
have anything to do with the normal request handling.
module sets the content type of a file, if it
hasn't already been done by the preceding modules. This is usually
done by looking up the Mime type for a certain file extension in a
database. There can only be one Types module in each virtual server.
The Content Types is the only Types module in the
modules receives one URL and returns another. In
other words, the URL modules transform requests into other requests.
This is useful when a web page is published under several names, or
when a web page has moved.