Linux Network Administratoramp;#039;s Guide (3rd Edition) [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Network Administratoramp;#039;s Guide (3rd Edition) [Electronic resources] - نسخه متنی

Tony Bautts, Terry Dawson, Gregor N. Purdy

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







14.2. Configuring and Building Apache


If your Linux distribution does not
currently have Apache, the easiest way to get it is from one of the
many Apache mirror sites. A list can be found at the main Apache
Software Foundation site, http://www.apache.org. At present, there are
two branches of the Apache HTTPD version tree, 1.3 and 2.0. The new
version tree, v2.0 offers new features and is being actively
developed, but is more likely to be susceptible to bugs and
vulnerabilities. In this chapter, we will be using the most recent
version of the 1.3 branch because of its proven reliability and
stability. Many of the configuration options, however, are similar in
both versions.


14.2.1. Getting and Compiling the Software


You have the option of obtaining
Apache in either source format or package format. If you are
installing from package, you will not have the same amount of initial
configuration flexibility as you would building from source. Packages
generally come with the most common options pre-built into the
binaries. If you are looking for specific features or options or if
you want to build a very minimal version of the server, you should
consider building from source.

Building Apache from source is similar to building other Linux source
packages and follows the "configure-make-make
install" path. Apache has many options that need to
be set at source configuration time. Among these is the ability to
select the modules which you would like to build or have disabled.
Modules are a great way to add or remove functionality to your web
server and cover a wide range of functionsfrom performance to
authentication and security. Table 14-1 shows a
sample list taken from the Apache documentation of a number of the
available modules.

Table 14-1. Apache modules

Type


Enabled or disabled by default


Function


Environment creation


mod_env


Enabled


Set environment variables for CGI/SSI scripts


mod_setenvif


Enabled


Set environment variables based on HTTP headers


mod_unique_id


Disabled


Generate unique identifiers for request


Content-type decisions


mod_mime


Enabled


Content type/encoding determination (configured)


mod_mime_magic


Disabled


Content type/encoding determination (automatic)


mod_negotiation


Enabled


Content selection based on the HTTP Accept* headers


URL mapping


mod_alias


Enabled


Simple URL translation and redirection


mod_rewrite


Disabled


Advanced URL translation and redirection


mod_userdir


Enabled


Selection of resource directories by username


mod_spelling


Disabled


Correction of misspelled URLs


Directory handling


mod_dir


Enabled


Directory and directory default file handling


mod_autoindex


Enabled


Automated directory index file generation


Access control


mod_access


Enabled


Access control (user, host, and network)


mod_auth


Enabled


HTTP basic authentication (user and password)


mod_auth_dbm


Disabled


HTTP basic authentication via UNIX NDBM files


mod_auth_db


Disabled


HTTP basic authentication via Berkeley DB files


mod_auth_anon


Disabled


HTTP basic authentication for anonymous-style users


mod_digest


Disabled


Digest authentication


HTTP response


mod_headers


Disabled


Arbitrary HTTP response headers (configured)


mod_cern_meta


Disabled


Arbitrary HTTP response headers (CERN-style files)


mod_expires


Disabled


Expires HTTP responses


mod_asis


Enabled


Raw HTTP responses


Scripting


mod_include


Enabled


Server Side Includes (SSI) support


mod_cgi


Enabled


Common Gateway Interface (CGI) support


mod_actions


Enabled


Map CGI scripts to act as internal
"handlers"


Internal content handlers


mod_status


Enabled


Content handler for server runtime status


mod_info


Disabled


Content handler for configuration summary


Request logging


mod_log_config


Enabled


Customizable logging of requests


mod_log_agent


Disabled


Specialized HTTP User-Agent logging (deprecated)


mod_log_referer


Disabled


Specialized HTTP Referrer logging (deprecated


mod_usertrack


Disabled


Logging of user click-trails via HTTP cookies


Miscellaneous


mod_imap


Enabled


Server-side image map support


mod_proxy


Disabled


Caching proxy module (HTTP, HTTPS, FTP)


mod_so


Disabled


Dynamic Shard Object (DSO) bootstrapping


Experimental


mod_mmap_static


Disabled


Caching of frequently served pages via mmap( )


Developmental


mod_example


Disabled


Apache API demonstration (developers only)

When you have decided which options to use, you can add them to the
configure script as follows. To enable a module, use:

vlager# ./configure -enable-module=module_name

To disable a default module, you can use the following command:

vlager# ./configure -disable-module=module_name

If you choose to enable or disable any of the default modules, make
sure you understand exactly what that modules does. Enabling or
disabling certain modules can adversely affect performance or
security. More information about the specific modules can be found on
the Apache web site.


The next step after configuration is to
compile the entire package. Like many other Linux programs, this is
accomplished by the make command. After you have
compiled, make install will install Apache in
the directory you specified via the -prefix=
option at configuration time.


/ 121