1 <?xml version='1.0' encoding='UTF-8' ?>
2 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Copyright 2003-2004 The Apache Software Foundation
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
22 <manualpage metafile="configure.xml.meta">
23 <parentdocument href="./">Programs</parentdocument>
25 <title>configure - Configure the source tree</title>
28 <p>The <code>configure</code> script configures the source tree
29 for compiling and installing the Apache HTTP Server on your
30 particular platform. Various options allow the compilation of a
31 server corresponding to your personal requirements.</p>
33 <p>This script, included in the root directory of the source
34 distribution, is for compilation on Unix and Unix-like systems
35 only. For other platforms, see the <a
36 href="../platform/">platform</a> documentation.</p>
39 <seealso><a href="../install.html">Compiling and Installing</a></seealso>
41 <section id="synopsis"><title>Synopsis</title>
42 <p>You should call the <code>configure</code> script from within the
43 root directory of the distribution.</p>
45 <p><code><strong>./configure</strong> [<var>OPTION</var>]...
46 [<var>VAR</var>=<var>VALUE</var>]...</code></p>
48 <p>To assign environment variables (e.g. <code>CC</code>,
49 <code>CFLAGS</code> ...), specify them as
50 <code><var>VAR</var>=<var>VALUE</var></code>. See <a href="#env">below</a>
51 for descriptions of some of the useful variables.</p>
54 <section id="options"><title>Options</title>
56 <li><a href="#configurationoptions">Configuration options</a></li>
57 <li><a href="#installationdirectories">Installation directories</a></li>
58 <li><a href="#systemtypes">System types</a></li>
59 <li><a href="#optionalfeatures">Optional features</a></li>
60 <li><a href="#supportopt">Options for support programs</a></li>
63 <section id="configurationoptions"><title>Configuration options</title>
65 <p>The following options influence the behavior of
66 <code>configure</code> itself.</p>
69 <dt><code>-C</code></dt>
70 <dt><code>--config-cache</code></dt>
71 <dd>This is an alias for <code>--cache-file=config.cache</code></dd>
73 <dt><code>--cache-file=<var>FILE</var></code></dt>
74 <dd>The test results will be cached in file <var>FILE</var>.
75 This option is disabled by default.</dd>
77 <dt><code>-h</code></dt>
78 <dt><code>--help [short|recursive]</code></dt>
79 <dd>Output the help and exit. With the argument <code>short</code> only
80 options specific to this package will displayed. The argument
81 <code>recursive</code> displays the short help of all the included
84 <dt><code>-n</code></dt>
85 <dt><code>--no-create</code></dt>
86 <dd>The <code>configure</code> script is run normally but does
87 not create output files. This is useful to check the test results
88 before generating makefiles for compilation.</dd>
90 <dt><code>-q</code></dt>
91 <dt><code>--quiet</code></dt>
92 <dd>Do not print <code>checking ...</code> messages during the
93 configure process.</dd>
95 <dt><code>--srcdir=<var>DIR</var></code></dt>
96 <dd>Defines directory <var>DIR</var> to be the source file directory.
97 Default is the directory, where configure is located, or the parent
98 directory <code>..</code>.</dd>
100 <dt><code>--silent</code></dt>
101 <dd>Same as <code>--quiet</code></dd>
105 <dd>Display copyright information and exit.</dd>
109 <section id="installationdirectories"><title>Installation
112 <p>These options define the installation directory. The installation
113 tree depends on the selected layout.</p>
116 <dt><code>--prefix=<var>PREFIX</var></code></dt>
117 <dd>Install architecture-independent files in <var>PREFIX</var>.
118 By default the installation directory is set to
119 <code>/usr/local/apache2</code>.</dd>
121 <dt><code>--exec-prefix=<var>EPREFIX</var></code></dt>
122 <dd>Install architecture-dependent files in <var>EPREFIX</var>.
123 By default the installation directory is set to the
124 <var>PREFIX</var> directory.</dd>
127 <p>By default, <code>make install</code> will install all the files in
128 <code>/usr/local/apache2/bin</code>, <code>/usr/local/apache2/lib</code>
129 etc. You can specify an installation prefix other than
130 <code>/usr/local/apache2</code> using <code>--prefix</code>,
131 for instance <code>--prefix=$HOME</code>.</p>
133 <section id="layout"><title>Define a directory layout</title>
135 <dt><code>--enable-layout=<var>LAYOUT</var></code></dt>
136 <dd>Configure the source code and build scripts to assume an
137 installation tree based on the layout <var>LAYOUT</var>. This allows
138 you to separately specify the locations for each type of file within
139 the Apache HTTP Server installation. The <code>config.layout</code>
140 file contains several example configurations, and you can also create
141 your own custom configuration following the examples. The different
142 layouts in this file are grouped into <code><Layout
143 FOO>...</Layout></code> sections and referred to by name as
144 in <code>FOO</code>. The default layout is <code>Apache</code>.</dd>
148 <section id="directoryfinetuning"><title>Fine tuning of the installation
151 <p>For better control of the installation directories, use the options
152 below. Please note that the directory defaults are set by
153 <code>autoconf</code> and be overwritten by the corresponding layout
157 <!-- only apr-config and apu-config are installed at bindir.
158 everything else is stored at sbindir. ==> clarify/change this -->
159 <dt><code>--bindir=<var>DIR</var></code></dt>
160 <dd>Install user executables in <var>DIR</var>. The user executables
161 are supporting programs like <program>htpasswd</program>,
162 <program>dbmmanage</program>, etc. which are useful for site
163 administrators. By default <var>DIR</var> is set to
164 <code><var>EPREFIX</var>/bin</code>.</dd>
166 <dt><code>--datadir=<var>DIR</var></code></dt>
167 <dd>Install read-only architecture-independent data in <var>DIR</var>.
168 By default <code>datadir</code> is set to
169 <code><var>PREFIX</var>/share</code>. This option is offered by
170 <code>autoconf</code> and currently unused.</dd>
172 <dt><code>--includedir=<var>DIR</var></code></dt>
173 <dd>Install C header files in <var>DIR</var>. By default
174 <code>includedir</code> is set to
175 <code><var>EPREFIX</var>/include</code>.</dd>
177 <dt><code>--infodir=<var>DIR</var></code></dt>
178 <dd>Install info documentation in <var>DIR</var>.
179 By default <code>infodir</code> is set to
180 <code><var>PREFIX</var>/info</code>. This option is currently
183 <dt><code>--libdir=<var>DIR</var></code></dt>
184 <dd>Install object code libraries in <var>DIR</var>. By default
185 <code>libdir</code> is set to
186 <code><var>EPREFIX</var>/lib</code>.</dd>
188 <dt><code>--libexecdir=<var>DIR</var></code></dt>
189 <dd>Install the program executables (i.e., shared modules) in
190 <var>DIR</var>. By default <code>libexecdir</code> is set to
191 <code><var>EPREFIX</var>/libexec</code>.</dd>
193 <dt><code>--localstatedir=<var>DIR</var></code></dt>
194 <dd>Install modifiable single-machine data in <var>DIR</var>.
195 By default <code>localstatedir</code> is set to
196 <code><var>PREFIX</var>/var</code>. This option is offered by
197 <code>autoconf</code> and currently unused.</dd>
199 <dt><code>--mandir=<var>DIR</var></code></dt>
200 <dd>Install the man documentation in <var>DIR</var>. By default
201 <code>mandir</code> is set to
202 <code><var>EPREFIX</var>/man</code>.</dd>
204 <dt><code>--oldincludedir=<var>DIR</var></code></dt>
205 <dd>Install C header files for non-gcc in <var>DIR</var>.
206 By default <code>oldincludedir</code> is set to
207 <code>/usr/include</code>. This option is offered by
208 <code>autoconf</code> and currently unused.</dd>
210 <dt><code>--sbindir=<var>DIR</var></code></dt>
211 <dd>Install the system administrator executables in <var>DIR</var>.
212 Those are server programs like <program>httpd</program>,
213 <program>apachectl</program>, <program>suexec</program>, etc. which
214 are neccessary to run the Apache HTTP Server. By default
215 <code>sbindir</code> is set to
216 <code><var>EPREFIX</var>/sbin</code>.</dd>
218 <dt><code>--sharedstatedir=<var>DIR</var></code></dt>
219 <dd>Install modifiable architecture-independent data in <var>DIR</var>.
220 By default <code>sharedstatedir</code> is set to
221 <code><var>PREFIX</var>/com</code>. This option is offered by
222 <code>autoconf</code> and currently unused.</dd>
224 <dt><code>--sysconfdir=<var>DIR</var></code></dt>
225 <dd>Install read-only single-machine data like the server configuration
226 files <code>httpd.conf</code>, <code>mime.types</code>, etc. in
227 <var>DIR</var>. By default <code>sysconfdir</code> is set to
228 <code><var>PREFIX</var>/etc</code>.</dd>
233 <section id="systemtypes"><title>System types</title>
235 <p>These options are used to cross-compile the Apache HTTP Server to run on
236 another system. In normal cases, when building and running the server on
237 the same system, these options are not used.</p>
240 <dt><code>--build=<var>BUILD</var></code></dt>
241 <dd>Defines the system type of the system on which the tools are being
242 built. It defaults to the result of the script
243 <code>config.guess</code>.</dd>
245 <dt><code>--host=<var>HOST</var></code></dt>
246 <dd>Defines the system type of the system on which the server will run.
247 <var>HOST</var> defaults to <var>BUILD</var>.</dd>
249 <dt><code>--target=<var>TARGET</var></code></dt>
250 <dd>Configure for building compilers for the system type
251 <var>TARGET</var>. It defaults to <var>HOST</var>. This option is
252 offered by <code>autoconf</code> and not necessary for the Apache HTTP
257 <section id="optionalfeatures"><title>Optional Features</title>
259 <p>These options are used to fine tune the features your HTTP server will
262 <section id="generaloptfeat"><title>General syntax</title>
263 <p>Generally you can use the following syntax to enable or disable a
267 <dt><code>--disable-<var>FEATURE</var></code></dt>
268 <dd>Do not include <var>FEATURE</var>. This is the same as
269 <code>--enable-<var>FEATURE</var>=no</code>.</dd>
271 <dt><code>--enable-<var>FEATURE</var>[=<var>ARG</var>]</code></dt>
272 <dd>Include <var>FEATURE</var>. The default value for <var>ARG</var>
273 is <code>yes</code>.</dd>
275 <dt><code>--enable-<var>MODULE</var>=shared</code></dt>
276 <dd>The corresponding module will be build as DSO module.</dd>
278 <dt><code>--enable-<var>MODULE</var>=static</code></dt>
279 <dd>By default enabled modules are linked statically. You can force
280 this explicitly.</dd>
283 <note><title>Note</title>
284 <code>configure</code> will not complain about
285 <code>--enable-<var>foo</var></code> even if <var>foo</var> doesn't
286 exist, so you need to type carefully.
290 <!-- to do: add better enable-module descriptions and recommendations -->
291 <section id="enabledmodules"><title>Modules enabled by default</title>
292 <p>Some modules are compiled by default and have to be disabled
293 explicitly. Use the following options to remove discrete modules from
294 the compilation process.</p>
297 <dt><code>--disable-actions</code></dt>
298 <dd>Disable action triggering on requests, which is provided by
299 <module>mod_actions</module>.</dd>
301 <dt><code>--disable-alias</code></dt>
302 <dd>Disable the mapping of requests to different parts of the
303 filesystem, which is provided by <module>mod_alias</module>.</dd>
305 <dt><code>--disable-asis</code></dt>
306 <dd>Disable support for as-is filetypes, which is provided by
307 <module>mod_asis</module>.</dd>
309 <dt><code>--disable-auth</code></dt>
310 <dd>Disable user-based access control provided by
311 <module>mod_auth</module>. This module provides for HTTP Basic
312 Authentication, where the usernames and passwords are stored in
313 plain text files.</dd>
315 <dt><code>--disable-autoindex</code></dt>
316 <dd>Disable the directory listing functionality provided by
317 <module>mod_autoindex</module>.</dd>
319 <dt><code>--disable-access</code></dt>
320 <dd>Disable host-based access control provided by
321 <module>mod_access</module>.</dd>
323 <dt><code>--disable-cgi</code></dt>
324 <dd><module>mod_cgi</module>, which provides support for CGI scripts,
325 is enabled by default when using a non-threaded MPM. Use this
326 option to disable CGI support.</dd>
328 <dt><code>--disable-cgid</code></dt>
329 <dd>When using the threaded MPMs <module>worker</module> or
330 <module>perchild</module> support for CGI scripts is provided by
331 <module>mod_cgid</module> by default. To disable CGI support use
334 <dt><code>--disable-charset-lite</code></dt>
335 <dd>Disable character set translation provided by
336 <module>mod_charset_lite</module>. This module will be installed by
337 default only on EBCDIC systems.</dd>
339 <dt><code>--disable-dir</code></dt>
340 <dd>Disable directory request handling provided by
341 <module>mod_dir</module>.</dd>
343 <dt><code>--disable-env</code></dt>
344 <dd>Enable setting and clearing of environment variables, which is
345 provided by <module>mod_env</module>.</dd>
347 <!-- configure mentions enable-http, but disable-http would make much
349 <dt><code>--disable-http</code></dt>
350 <dd>Disable the HTTP protocol handling. The <code>http</code>
351 module is a basic one, enabling the server to function as an
352 HTTP server. It is only useful to disable it if you want to use
353 another protocol module instead. <strong>Don't disable this
354 module unless you are really sure what you are doing.</strong>
356 Note: This module will always be linked statically.</dd>
358 <dt><code>--disable-imap</code></dt>
359 <dd>Disable support for server based imagemaps, which provided by
360 <module>mod_imap</module>.</dd>
362 <dt><code>--disable-include</code></dt>
363 <dd>Disable Server Side Includes provided by
364 <module>mod_include</module>.</dd>
366 <dt><code>--disable-log-config</code></dt>
367 <dd>Disable the logging configuration provided by
368 <module>mod_log_config</module>. You won't be able to log requests
369 to the server without this module.</dd>
371 <dt><code>--disable-mime</code></dt>
372 <dd><module>mod_mime</module> associates the requested filename's
373 extensions with the file's behavior and content (mime-type,
374 language, character set and encoding). Disabling the mapping of
375 file-extensions to MIME is normally not recommended.</dd>
377 <dt><code>--disable-negotiation</code></dt>
378 <dd>Disable content negotiation provided by
379 <module>mod_negotiation</module>.</dd>
381 <dt><code>--disable-setenvif</code></dt>
382 <dd>Disable support for basing environment variables on headers,
383 which is provided by <module>mod_setenvif</module>.</dd>
385 <dt><code>--disable-status</code></dt>
386 <dd>Enable the process/thread monitoring, which is provided by
387 <module>mod_status</module>.</dd>
389 <dt><code>--disable-userdir</code></dt>
390 <dd>Disable the mapping of requests to user-specific directories,
391 which is provided by <module>mod_userdir</module>.</dd>
395 <section id="disabledmodules"><title>Modules, disabled by default</title>
396 <p>Some modules are compiled by default and have to be enabled
397 explicitly or by using the keywords <code>most</code> or
398 <code>all</code> (see <code>--enable-mods-shared</code> below for
399 further explanation) to be available. Therefore use the options
403 <dt><code>--enable-auth-anon</code></dt>
404 <dd>Enable anonymous user access provided by
405 <module>mod_auth_anon</module>.</dd>
407 <dt><code>--enable-auth-dbm</code></dt>
408 <dd><module>mod_auth_dbm</module> provides for HTTP Basic
409 Authentication, where the usernames and passwords are stored in DBM
410 type database files. Use this option to enable the module.</dd>
412 <dt><code>--enable-auth-digest</code></dt>
413 <dd>Enable RFC2617 Digest authentication provided by
414 <module>mod_auth_digest</module>. This module uses plain text files
415 to store the credentials.</dd>
417 <dt><code>--enable-authnz-ldap</code></dt>
418 <dd>Enable LDAP based authentication provided by
419 <module>mod_authnz_ldap</module>.</dd>
421 <dt><code>--enable-cache</code></dt>
422 <dd>Enable dynamic file caching provided by
423 <module>mod_cache</module>. This experimental module may be
424 interesting for servers with high load or caching proxy servers. At
425 least one storage management module (e.g.
426 <module>mod_disk_cache</module> or <module>mod_mem_cache</module>)
427 is also necessary.</dd>
429 <dt><code>--enable-cern-meta</code></dt>
430 <dd>Enable the CERN-type meta files support provided by
431 <module>mod_cern_meta</module>.</dd>
433 <dt><code>--enable-charset-lite</code></dt>
434 <dd>Enable character set translation provided by
435 <module>mod_charset_lite</module>. This module will be installed by
436 default only on EBCDIC systems. On other systems, you have to enable
439 <dt><code>--enable-dav</code></dt>
440 <dd>Enable the WebDAV protocol handling provided by
441 <module>mod_dav</module>. Support for filesystem resources is
442 provided by the seperate module <module>mod_dav_fs</module>. This
443 module is also automatically enabled with
444 <code>--enable-dav</code>.<br/>
445 Note: <module>mod_dav</module> can only be used together with the
446 <code>http</code> protocol module.</dd>
448 <dt><code>--enable-dav-fs</code></dt>
449 <dd>Enable DAV support for filesystem resources, which is provided by
450 <module>mod_dav_fs</module>. This module is a provider for the
451 <module>mod_dav</module> module, so you should also use
452 <code>--enable-dav</code>.</dd>
454 <dt><code>--enable-dav-lock</code></dt>
455 <dd>Enable <module>mod_dav_lock</module> which provides generic DAV
456 locking support for backend modules. This module needs at least
457 <module>mod_dav</module> to function, so you should also use
458 <code>--enable-dav</code>.</dd>
460 <dt><code>--enable-deflate</code></dt>
461 <dd>Enable deflate transfer encoding provided by
462 <module>mod_deflate</module>.</dd>
464 <dt><code>--enable-disk-cache</code></dt>
465 <dd>Enable disk caching provided by
466 <module>mod_disk_cache</module>.</dd>
468 <dt><code>--enable-expires</code></dt>
469 <dd>Enable Expires header control provided by
470 <module>mod_expires</module>.</dd>
472 <dt><code>--enable-ext-filter</code></dt>
473 <dd>Enable the external filter support provided by
474 <module>mod_ext_filter</module>.</dd>
476 <dt><code>--enable-file-cache</code></dt>
477 <dd>Enable the file cache provided by
478 <module>mod_file_cache</module>.</dd>
480 <dt><code>--enable-headers</code></dt>
481 <dd>Enable control of HTTP headers provided by
482 <module>mod_headers</module>.</dd>
484 <dt><code>--enable-info</code></dt>
485 <dd>Enable the server information provided by
486 <module>mod_info</module>.</dd>
488 <dt><code>--enable-ldap</code></dt>
489 <dd>Enable LDAP caching and connection pooling services provided by
490 <module>mod_ldap</module>.</dd>
492 <dt><code>--enable-logio</code></dt>
493 <dd>Enable logging of input and output bytes including headers provided
494 by <module>mod_logio</module>.</dd>
496 <dt><code>--enable-mem-cache</code></dt>
497 <dd>Enable memory caching provided by
498 <module>mod_mem_cache</module>.</dd>
500 <dt><code>--enable-mime-magic</code></dt>
501 <dd>Enable automatical determining of MIME types, which is provided by
502 <module>mod_mime_magic</module>.</dd>
504 <dt><code>--enable-isapi</code></dt>
505 <dd>Enable the isapi extension support provided by
506 <module>mod_isapi</module>.</dd>
508 <dt><code>--enable-proxy</code></dt>
509 <dd>Enable the proxy/gateway functionality provided by
510 <module>mod_proxy</module>. The proxying capabilities for
511 <code>CONNECT</code>, <code>FTP</code> and <code>HTTP</code> are
512 provided by the seperate modules <module>mod_proxy_connect</module>,
513 <module>mod_proxy_ftp</module> and <module>mod_proxy_http</module>.
514 These three modules are also automatically enabled with
515 <code>--enable-proxy</code>.</dd>
517 <dt><code>--enable-proxy-connect</code></dt>
518 <dd>Enable proxy support for <code>CONNECT</code> request handling,
519 which is provided by <module>mod_proxy_connect</module>. This module
520 is an extension for the <module>mod_proxy</module> module, so you
521 should also use <code>--enable-proxy</code>.</dd>
523 <dt><code>--enable-proxy-ftp</code></dt>
524 <dd>Enable proxy support for <code>FTP</code> requests, which is
525 provided by <module>mod_proxy_ftp</module>.. This module
526 is an extension for the <module>mod_proxy</module> module, so you
527 should also use <code>--enable-proxy</code>.</dd>
529 <dt><code>--enable-proxy-http</code></dt>
530 <dd>Enable proxy support for <code>HTTP</code> requests, which is
531 provided by <module>mod_proxy_http</module>. This module
532 is an extension for the <module>mod_proxy</module> module, so you
533 should also use <code>--enable-proxy</code>.</dd>
535 <dt><code>--enable-rewrite</code></dt>
536 <dd>Enable rule based URL manipulation provided by
537 <module>mod_rewrite</module>.</dd>
539 <dt><code>--enable-so</code></dt>
540 <dd>Enable DSO capability provided by <module>mod_so</module>. This
541 module will be automatically enabled if you use the
542 <code>--enable-mods-shared</code> option.</dd>
544 <dt><code>--enable-speling</code></dt>
545 <dd>Enable the functionality to correct common URL misspellings, which
546 is provided by <module>mod_spelling</module>.</dd>
548 <dt><code>--enable-ssl</code></dt>
549 <dd>Enable support for SSL/TLS provided by
550 <module>mod_ssl</module>.</dd>
552 <dt><code>--enable-unique-id</code></dt>
553 <dd>Enable the generation of per-request unique ids, which is provided
554 by <module>mod_unique_id</module>.</dd>
556 <dt><code>--enable-usertrack</code></dt>
557 <dd>Enable user-session tracking provided by
558 <module>mod_usertrack</module>.</dd>
560 <dt><code>--enable-vhost-alias</code></dt>
561 <dd>Enable mass virtual hosting provided by
562 <module>mod_vhost_alias</module>.</dd>
566 <section id="developermodules"><title>Modules for developers</title>
567 <p>The following modules are useful only for developers and testing
568 purposes and are disabled by default. Use the following options to
569 enable them. If you are not sure whether you need one of these
570 modules, omit them.</p>
573 <!-- module doc needed -->
574 <dt><code>--enable-bucketeer</code></dt>
575 <dd>Enable the manipulation filter for buckets, which is provided by
576 <code>mod_bucketeer</code>.</dd>
578 <!-- module doc needed -->
579 <dt><code>--enable-case-filter</code></dt>
580 <dd>Enable the example uppercase conversion output filter support of
581 <code>mod_case_filter</code>.</dd>
583 <!-- module doc needed -->
584 <dt><code>--enable-case-filter-in</code></dt>
585 <dd>Enable the example uppercase conversion input filter support of
586 <code>mod_case_filter_in</code>.</dd>
588 <dt><code>--enable-echo</code></dt>
589 <dd>Enable the ECHO server provided by
590 <module>mod_echo</module>.</dd>
592 <dt><code>--enable-example</code></dt>
593 <dd>Enable the example and demo module
594 <module>mod_example</module>.</dd>
596 <!-- module doc needed -->
597 <dt><code>--enable-optional-fn-export</code></dt>
598 <dd>Enable the example for an optional function exporter, which is
599 provided by <code>mod_optional_fn_export</code>.</dd>
601 <!-- module doc needed -->
602 <dt><code>--enable-optional-fn-import</code></dt>
603 <dd>Enable the example for an optional function importer, which is
604 provided by <code>mod_optional_fn_import</code>.</dd>
606 <!-- module doc needed -->
607 <dt><code>--enable-optional-hook-export</code></dt>
608 <dd>Enable the example for an optional hook exporter, which is provided
609 by <code>mod_optional_hook_export</code>.</dd>
611 <!-- module doc needed -->
612 <dt><code>--enable-optional-hook-import</code></dt>
613 <dd>Enable the example optional hook importer, which is provided by
614 <code>mod_optional_hook_import</code>.</dd>
618 <section id="modules"><title>MPMs and third-party modules</title>
619 <p>To add the necessary Multi Processing Module and additional third-party
620 modules use the following options:</p>
623 <dt><code>--with-module=<var>module-type</var>:<var>module-file</var>
625 <dd><p>Add a third-party module to the list of statically linked
626 modules. The module source file <code><var>module-file</var></code>
627 will be searched in the <code>modules/<var>module-type</var></code>
628 subdirectory of your Apache HTTP server source tree so it has to be
629 placed there before. If it is not found here
630 <code>configure</code> is considering <var>module-file</var> to be
631 an absolute file path and tries to copy the source file into the
632 <var>module-type</var> subdirectory.</p>
633 <p>This option is useful to add small external modules consisting of
634 one source file. For more complex modules you should read the
635 vendor's documentation.</p>
636 <note><title>Note</title>
637 If you want to build a DSO module instead of a statically linked
638 use <program>apxs</program>.</note>
641 <dt><code>--with-mpm=MPM</code></dt>
642 <dd>Choose the process model for your server. You have to select
643 exactly one <a href="../mpm.html">Multi-Processing Module</a>.
644 Otherwise the <a href="../mpm.html#defaults">default MPM</a> for
645 your operating system will be taken. Possible MPMs are
646 <module>beos</module>, <module>leader</module>,
647 <module>mpmt_os2</module>, <module>perchild</module>,
648 <module>prefork</module>, <module>threadpool</module> and
649 <module>worker</module>.</dd>
653 <section id="otheroptfeat"><title>Cumulative and other options</title>
655 <dt><code>--enable-maintainer-mode</code></dt>
656 <dd>Turn on debugging and compile time warnings.</dd>
658 <dt><code>--enable-mods-shared=<var>MODULE-LIST</var></code></dt>
660 <p>Defines a list of modules to be enabled and build as dynamic
661 shared modules. This mean, these module have to be loaded
662 dynamically by using the <directive
663 module="mod_so">LoadModule</directive> directive.</p>
664 <p><var>MODULE-LIST</var> is a space separated list of modulenames
665 enclosed by quotation marks. The module names are given without the
666 preceding <code>mod_</code>. For example:</p>
668 --enable-mods-shared='headers rewrite dav'
670 <p>Additionally you can use the special keywords <code>all</code> and
671 <code>most</code>. For example,</p>
673 --enable-mods-shared=most
675 <p>will compile most modules and build them as DSO modules.
676 <!-- See <a href="../install/enabledmodules.html">Overview of
677 enabled modules</a> for further information. --></p>
680 <dt><code>--enable-modules=<var>MODULE-LIST</var></code></dt>
681 <dd>This option behaves similar to <code>--enable-mods-shared</code>,
682 but will link the given modules statically. This mean, these modules
683 will always be present while running <program>httpd</program>. They need
684 not be loaded with <directive
685 module="mod_so">LoadModule</directive>.</dd>
687 <dt><code>--enable-v4-mapped</code></dt>
688 <dd>Allow IPv6 sockets to handle IPv4 connections.</dd>
690 <dt><code>--with-port=<var>PORT</var></code></dt>
691 <dd>This defines the port on which <program>httpd</program> will listen.
692 This port number is used when generating the configuration file
693 <code>httpd.conf</code>. The default is 80.</dd>
695 <dt><code>--with-program-name</code></dt>
696 <dd>Define an alternative executable name. The default is
697 <code>httpd</code>.</dd>
702 <section id="packages"><title>Optional packages</title>
703 <p>These options are used to define optional packages.</p>
705 <section id="generalpackages"><title>General syntax</title>
706 <p>Generally you can use the following syntax to define an optional
710 <dt><code>--with-<var>PACKAGE</var>[=<var>ARG</var>]</code></dt>
711 <dd>Use the package <var>PACKAGE</var>. The default value for
712 <var>ARG</var> is<code>yes</code>.</dd>
714 <dt><code>--without-<var>PACKAGE</var></code></dt>
715 <dd>Do not use the package <var>PACKAGE</var>. This is the same as
716 <code>--with-<var>PACKAGE</var>=no</code>. This option is provided by
717 <code>autoconf</code> but not very useful for the Apache HTTP
722 <!-- options not known are passed to packasges?
723 are there other important options for packages? -->
725 <section id="packageopt"><title>Specific packages</title>
727 <dt><code>--with-apr=<var>DIR</var>|<var>FILE</var></code></dt>
728 <dd>The Apache Portable Runtime (APR) is part of the httpd
729 source distribution and will automatically be build together with the
730 HTTP server. If you want to use an already installed APR instead you
731 have to tell <code>configure</code> the path to the
732 <code>apr-config</code> script. You may set the absolute path and name
733 or the directory to the installed APR. <code>apr-config</code> must
734 exists within this directory or the subdirectory
735 <code>bin</code>.</dd>
737 <dt><code>--with-apr-util=<var>DIR</var>|<var>FILE</var></code></dt>
738 <dd>The Apache Portable Runtime Utilities (APU) are part of the
739 httpd source distribution and will automatically be build
740 together with the HTTP server. If you want to use an already installed
741 APU instead you have to tell <code>configure</code> the path to the
742 <code>apu-config</code> script. You may set the absolute path and name
743 or the directory to the installed APU. <code>apu-config</code> must
744 exists within this directory or the subdirectory
745 <code>bin</code>.</dd>
747 <dt><code>--with-ssl=<var>DIR</var></code></dt>
748 <dd>If <module>mod_ssl</module> has been enabled <code>configure</code>
749 searches for an installed OpenSSL. You can set the directory path
750 to the SSL/TLS toolkit instead.</dd>
752 <dt><code>--with-z=<var>DIR</var></code></dt>
753 <dd><code>configure</code> searches automatically for an installed
754 <code>zlib</code> library if your source configuration requires one
755 (e.g., when <module>mod_deflate</module> is enabled). You can set the
756 directory path to the compression library instead.</dd>
759 <p>Several features of the Apache HTTP Server, including
760 <module>mod_authn_dbm</module> and <module>mod_rewrite</module>'s DBM
761 <directive module="mod_rewrite">RewriteMap</directive> use simple
762 key/value databases for quick lookups of information. SDBM is included
763 in the APU, so this database is always available. If you would like to
764 use other database types, use the following options to enable
768 <dt><code>--with-gdbm[=<var>path</var>]</code></dt>
769 <dd>If no <var>path</var> is specified, <code>configure</code> will
770 search for the include files and libraries of a GNU DBM
771 installation in the usual search paths. An explicit
772 <var>path</var> will cause <code>configure</code> to look in
773 <code><var>path</var>/lib</code> and
774 <code><var>path</var>/include</code> for the relevant files.
775 Finally, the <var>path</var> may specify specific include and
776 library paths separated by a colon.</dd>
778 <dt><code>--with-ndbm[=<var>path</var>]</code></dt>
779 <dd>Like <code>--with-gdbm</code>, bur searches for a New DBM
782 <dt><code>--with-berkeley-db[=<var>path</var>]</code></dt>
783 <dd>Like <code>--with-gdbm</code>, but searches for a Berkeley DB
787 <note><title>Note</title>
788 <p>The DBM options are provided by the APU and passed through to its
789 configuration script. They are useless when using an already
790 installed APU defined by <code>--with-apr-util</code>.</p>
791 <p>You may use more then one DBM implementation together with your
792 HTTP server. The appropriated DBM type will be configured within
793 the runtime configuration at each time.</p>
798 <section id="supportopt"><title>Options for support programs</title>
800 <dt><code>--enable-static-support</code></dt>
801 <dd>Build a statically linked version of the support binaries. This
802 means, a stand-alone executable will be built with all the necessary
803 libraries integrated. Otherwise the support binaries are linked
804 dynamically by default.</dd>
806 <dt><code>--enable-suexec</code></dt>
807 <dd>Use this option to enable <program>
808 suexec</program>, which allows you to set
809 uid and gid for spawned processes. <strong>Do not use this
810 option unless you understand all the security implications of
811 running a suid binary on your server.</strong> Further options
812 to configure <program>suexec</program> are described <a
813 href="#suexec">below</a>.</dd> </dl>
815 <p>It is possible to create a statically linked binary of a single
816 support program by using the following options:</p>
819 <dt><code>--enable-static-ab</code></dt>
820 <dd>Build a statically linked version of <program>
823 <!-- missing documentation for chechgid -->
824 <dt><code>--enable-static-checkgid</code></dt>
825 <dd>Build a statically linked version of <code>checkgid</code>.</dd>
827 <!-- missing documentation for htdbm -->
828 <dt><code>--enable-static-htdbm</code></dt>
829 <dd>Build a statically linked version of <code>htdbm</code>.</dd>
831 <dt><code>--enable-static-htdigest</code></dt>
832 <dd>Build a statically linked version of <program>
833 htdigest</program>.</dd>
835 <dt><code>--enable-static-htpasswd</code></dt>
836 <dd>Build a statically linked version of <program>
837 htpasswd</program>.</dd>
839 <dt><code>--enable-static-logresolve</code></dt>
840 <dd>Build a statically linked version of <program>
841 logresolve</program>.</dd>
843 <dt><code>--enable-static-rotatelogs</code></dt>
844 <dd>Build a statically linked version of <program>
845 rotatelogs</program>.</dd>
848 <section id="suexec"><title>suexec configuration options</title>
849 <p>The following options are used to fine tune the behavior of <program>
850 suexec</program>. See <a
851 href="suexec.html#install">Configuring and installing suEXEC</a>
852 for further information.</p>
855 <dt><code>--with-suexec-bin</code></dt>
856 <dd>This defines the path to suexec binary. Default is
857 <code>--sbindir</code> (see <a href="directoryfinetuning">Fine
858 tuning of installation directories</a>).</dd>
860 <dt><code>--with-suexec-caller</code></dt>
861 <dd>This defines the user allowed to call <program>suexec</program>.
862 It should be the same as the user under which <program>httpd</program>
865 <dt><code>--with-suexec-docroot</code></dt>
866 <dd>This defines the directory tree under which <program>
867 suexec</program> access is allowed for executables. Default value is
868 <code>--datadir/htdocs</code>.</dd>
870 <dt><code>--with-suexec-gidmin</code></dt>
871 <dd>Define this as the lowest GID allowed to be a target user for
872 <program>suexec</program>. The default value is 100.</dd>
874 <dt><code>--with-suexec-logfile</code></dt>
875 <dd>This defines the filename of the <program>suexec</program> logfile.
876 By default the logfile is named <code>suexec_log</code> and located in
877 <code>--logfiledir</code>.</dd>
879 <dt><code>--with-suexec-safepath</code></dt>
880 <dd>Define the value of the environment variable <code>PATH</code> to
881 be set for processes started by <program>suexec</program>. Default
882 value is <code>/usr/local/bin:/usr/bin:/bin</code>.</dd>
884 <dt><code>--with-suexec-userdir</code></dt>
885 <dd>This defines the subdirectory under the user's directory that
886 contains all executables for which <program>suexec</program> access
887 is allowed. This setting is necessary when you want to use
888 <program>suexec</program> together with user-specific directories (as
889 provided by <module>mod_userdir</module>). The default is
890 <code>public_html</code>.</dd>
892 <dt><code>--with-suexec-uidmin</code></dt>
893 <dd>Define this as the lowest UID allowed to be a target user for
894 <program>suexec</program>. The default value is 100.</dd>
896 <dt><code>--with-suexec-umask</code></dt>
897 <dd>Set <code>umask</code> for processes started by
898 <program>suexec</program>. It defaults to your system settings.</dd>
904 <section id="env"><title>Environment variables</title>
905 <p>There are some useful environment variables to override the choices made by
906 <code>configure</code> or to help it to find libraries and programs with
907 nonstandard names or locations.</p>
909 <!-- are these all useful variables? -->
911 <dt><code>CC</code></dt>
912 <dd>Define the C compiler command to be used for compilation.</dd>
914 <dt><code>CFLAGS</code></dt>
915 <dd>Set C compiler flags you want to use for compilation.</dd>
917 <dt><code>CPP</code></dt>
918 <dd>Define the C preprocessor command to be used.</dd>
920 <dt><code>CPPFLAGS</code></dt>
921 <dd>Set C/C++ preprocessor flags, e.g. <code>-I<var>includedir</var></code>
922 if you have headers in a nonstandard directory <var>includedir</var>.</dd>
924 <dt><code>LDFLAGS</code></dt>
925 <dd>Set linker flags, e.g. <code>-L<var>libdir</var></code> if you have
926 libraries in a nonstandard directory <var>libdir</var>.</dd>