Red Hat DIRECTORY SERVER 2.0 - GATEWAY Uživatelský manuál Strana 29

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 96
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 28
Chapter 4. Supporting MIME types
Loading and using the MIME module
Modules:
All the various elements of web server functionality are split out into modules. These
are shared libraries that the web server loads when instructed to by its configuration
file. In turn, the presence of a module causes new commands to be available in the
configuration file corresponding to the newly available functionality.
We start by adding the line to the configuration file that loads the module.
LoadModule mime_module modules/mod_mime.so
TypesConfig /etc/mime.types
Figure 4-5. httpd.conf: Loading the MIME module
The LoadModule command takes two arguments. The second is the filename of the
shared library that it needs. Note that the pathname of the module is given relative to
the /etc/httpd directory. The first argument is the name of the module within that
file.
Normally you would consult the documentation to determine what a module’s name
is but there is a filthy hack you can often use to determine it automatically.
$ nm /etc/httpd/modules/mod_mime.so | grep --word D
000031e0 D mime_module
Figure 4-6. Getting module names from shared libraries
Don’t worry about what the line means in detail. If you really want to know then
read the fine manual page for nm. The third element in the answer is the module
name.
A list of all the common modules, together with their library file names, module
names and brief descriptions is given in Appendix A at the end of these notes.
The TypesConfig command indicates the file that has the correspondences between
file name suffixes and MIME content types.
So how does our web server work now? The pages are now presented as HTML.
25
Zobrazit stránku 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 95 96

Komentáře k této Příručce

Žádné komentáře