|
The
Apache web server has become the most popular web server
due to its modular design that gives web administrators
and developers tremendous power and flexibility.
A module is a piece of
code written to the Apache API specifications that is
loaded in the following ways:
- Dynamically-loaded
in the httpd.conf
- Statically-loaded
in the compiled httpd daemon
With its modular design
and API, third party developers can create modules that
are loaded with the httpd to add power to the
web server. Apache modules exist for applications such
as perl and php. By making these modules available to
the web server (via dynamic loading), your web server
can internally process instruction sets rather than
relying on external applications (such as CGI), increasing
the speed at which your web server responds to requests.
Listing Statically-Linked
Modules
The following modules
are statically linked in your Virtual Server's Apache.
There is no need to dynamically load these modules:
- apache_ssl
- mod_access
- mod_actions
- mod_alias
- mod_auth
- mod_auth_dbm
- mod_autoindex
- mod_cgi
- mod_dir
- mod_imap
- mod_include
- mod_log_agent
- mod_log_config
- mod_log_referer
- mod_mime
- mod_setenvif
- mod_so.c
- mod_userdir
For a description of
Apache modules, see the documentation
at the Apache Web Site
Using Dynamically-Loaded
Modules
Enetrics Communications has
customized certain aspects of the Apache 1.3.22 web server
for your Virtual Server. A key feature developed by
Enetrics Communications is the support for dynamically loading
modules. The ability to dynamically load modules is
known as "DSO" support. The ~/www/modules
directory contains Apache modules that you can add to
your web server dynamically:Available Dynamic Apache
ModulesMost Common Modules
All Other Modules
Loading the Dynamically
Loadable Modules
Dynamic modules are loaded
in the ~/www/conf/httpd.conf file. LoadModule
is used at the top of the httpd.conf file (so
the module loads before any instructions are passed
to it).
Loading a Dynamically
Loadable Module
At the beginning of the
httpd.conf file, type:
LoadModule module
filename
For more details on the
LoadModule command, see the Apaceh Web Site Documentation
for the LoadModule Directive
The following is an example:
LoadModule env_module
modules/mod_env.so
Note: The modules
directory is a subdirectory of the ServerRoot
directory (~/usr/local/etc/httpd). The Virtual Server owns the modules directory, but the module
files contained in the directory are owned by root.
The modules do not count against your Virtual Server
quota.
You can load most modules
with just the LoadModule command. However, the
info and status modules require additional
lines in the httpd.conf file.
Loading info_module
- From the top of the
httpd.conf, type:
LoadModule info_module
modules/mod_info.so
- After the LoadModule
command, type:
<Location /status>
SetHandler server-status
</Location>
<Location /info>
SetHandler server-info
</Location>
Loading status_module
- From the top of the
httpd.conf, type:
LoadModule status_module
modules/mod_status.so
- After the LoadModule
command, type:
<Location /status>
SetHandler server-status
</Location>
<Location /info>
SetHandler server-info
</Location>
Using status_module
for Your Apache Web Server
Open the browser of your
choice and go to:
http://www.yourcompany.com/status/
Refreshing the Status
of Your Apache Web Server Every Ten Seconds
Open the browser of your
choice and go to:
http://www.yourcompany.com/status?refresh=10
Using the info Module
Open the browser of your
choice and go to:
http://www.yourcompany.com/info/
This displays Apache
web server information, such as which modules are loaded
and other server configuration settings.
If you already have a
/status directory or /info directory,
substitute <Location /infoparameter>
with whatever location you want. For instance, use <Location
/apacheinfo> instead. To pull up the info module
with the new location, use http://www.yourcompany.com/apacheinfo/.
Note: Some modules
require additional accessing parameters, so be sure
to access the urls listed with the modules for complete
documentation.
Compiling Your Own DSO
Modules
You can download your
own modules and compile them on your virtual web server.
However, Enetrics Communications does not support compiling
or debugging modules.
Apache 1.3 supports the
APXS (APache eXtenSion) tool. APXS allows you to compile
and link your own dynamic shared object (DSO) Apache
modules. To use APXS, connect to your Virtual Server
via Telnet or SSH and type the following command:
% /usr/local/apache/1.3/bin/apxs
OPTIONS MODULE_CODE
See the Apache Web Site
Document on DSO
modules for more information.
|