
134
|
Chapter 6: Administering Apache
The alias (new name) comes first in the directive, followed by the actual location of
the directory. The directory may be outside of the document root. In this case, the
file /tmp/test/button.gif would be accessible as the URL http://www.example.com/test/
button.gif, even though it’s not in /var/www/test.
Limits
On a busy server, Apache can create many simultaneous child processes and use a lot
of memory. This can increase the load average and make the system sluggish or even
unresponsive. Table 6-2 shows how you can limit some of Apache’s runtime values
in the site configuration file.
Server-Side Includes
SSI can be used to include file contents, the output of programs, or the contents of
environment variables as part of an HTML file. The syntax to specify SSI in Apache
configuration files can be misleading. For example, to allow only server-side includes
in /var/www/ssi but no other options, create the directory:
# mkdir /var/www/ssi
and tell Apache to allow only SSI within it:
<Location /ssi>
Options Includes
</Location>
To add SSI to existing options, use:
<Location /ssi>
Options +Includes
</Location>
SSI lets you include file contents, but it can also run any program and include its out-
put. This can be unsafe, so to restrict SSI inclusion to file contents only, use:
Table 6-2. Apache resource directives
Directive Default Usage
MaxClients 256
Maximum simultaneous ...