install.html revision 455a5f75c9935108a7ac1d50996f404e0553ac17
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox User<!--%hypertext -->
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
ab496cc3df1648e9ad992a87c35c2c0870fdc69dTinderbox User<TITLE>Compiling and Installing Apache</TITLE>
287a6a8f9040dc43560cd69cddf83bfc0f53b76fTinderbox User<!--/%hypertext -->
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox UserInformation on the latest version of Apache can be found on the Apache
dedefc0bdbb4e6e39eeb98aa2fc6883efec2ddb0Mark Andrewsweb server at http://www.apache.org/. This will list the current release,
e676a596869d8a80a644c99a848afb53d1c5975eMark Andrewsany more recent beta-test release, together with details of mirror
e676a596869d8a80a644c99a848afb53d1c5975eMark Andrewsweb and anonymous ftp sites.
a7c412f37cc73d0332887a746e81220cbf09dd00Mark AndrewsThis release of Apache supports the notion of `optional modules'.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsHowever, the server has to know which modules are compiled into it, in
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsorder for those modules to be effective; this requires generation of a
e676a596869d8a80a644c99a848afb53d1c5975eMark Andrewsshort bit of code (`<code>modules.c</code>') which simply has a list of them.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsIf you are satisfied with our standard module set, and expect to
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox Usercontinue to be satisfied with it, then you can just edit the stock
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews<code>Makefile</code> and compile as you have been doing previously. If you
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewslike to select optional modules, however, you need to run the
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox Userconfiguration script.
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews<li>Edit the file `<code>Configuration</code>'. This contains the per-machine
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox Userconfig settings of the Makefile, and also an additional section at
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsthe bottom which lists the modules which have been compiled in, and
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox Useralso names the files containing them. You will need to:
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User<li> Select a compiler and compilation options as appropriate to
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsyour machine.
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User<li> Uncomment lines corresponding to those optional modules you wish
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsto include (among the Module lines at the bottom of the file)
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox Useror add new lines corresponding to custom modules you have written.
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntNote that DBM auth has to be explicitly configured in, if you want
dc238a06bffa79de141ee7655765e2df91498a8aTinderbox Userit; just uncomment the corresponding line.
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt<li> Run the `Configure' script:
16f6050f29b6b0422cee858e609f65e474e70ef2Tinderbox User% Configure<br>
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterUsing 'Configuration' as config file<br>
0e573cdd111e060e5f6c18249b5ccacbe8abe278Tinderbox UserThis generates new versions of the Makefile and of modules.c. If
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Huntyou want to maintain multiple configurations, you can say, e.g.,
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterUsing alternate config file Configuration.ai<br>
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater<li>Type `make'.
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsThe modules we place in the Apache distribution are the ones we have
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewstested and are used regularly by various members of the Apache
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsdevelopment group. Additional modules contributed by members or third
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterparties with specific needs or functions are available at
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews<A HREF="http://www.apache.org/dist/contrib/modules/"><URL:http://www.apache.org/dist/contrib/modules/></A>. There are instructions on that page for
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewslinking these modules into the core Apache code.
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsAfter compilation, you will have a binary called `httpd' in the
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews<code>src/</code> directory. A binary distribution of Apache will supply this
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsThe next step is to edit the configuration files for the server. In
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsthe subdirectory called `conf' you should find distribution versions
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox Userof the three configuration files: <code>srm.conf-dist</code>,
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt<code>access.conf-dist</code> and <code>httpd.conf-dist</code>. Copy them to
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt<code>srm.conf</code>, <code>access.conf</code> and <code>httpd.conf</code>
2ae159b376dac23870d8005563c585acf85a4b5aEvan HuntFirst edit <code>httpd.conf</code>. This sets up general attributes about the
2ae159b376dac23870d8005563c585acf85a4b5aEvan Huntserver; the port number, the user it runs as, etc. Next edit the
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt<code>srm.conf</code> file; this sets up the root of the document tree,
2ae159b376dac23870d8005563c585acf85a4b5aEvan Huntspecial functions like server-parsed HTML or internal imagemap parsing, etc.
2ae159b376dac23870d8005563c585acf85a4b5aEvan HuntFinally, edit the <code>access.conf</code> file to at least set the base cases
7cc0a5d21ef046bfd630c4769943d896a7d7472cTinderbox UserFinally, make a call to httpd, with a -f to the full path to the
ee11dfc481f2ef6a032a715454f6290961a722d2Tinderbox User /usr/local/etc/apache/src/httpd -f /usr/local/etc/apache/conf/httpd.conf
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsThe server should be now running.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsBy default the <code>srm.conf</code> and <code>access.conf</code> files are
e40c4e4c17d4df338e2a7db0f84d8dbb3858964cTinderbox Userlocated by name; to specifically call them by other names, use the
0e573cdd111e060e5f6c18249b5ccacbe8abe278Tinderbox User<A HREF="core.html#accessconfig">AccessConfig</A> and
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<A HREF="core.html#resourceconfig">ResourceConfig</A> directives in
e40c4e4c17d4df338e2a7db0f84d8dbb3858964cTinderbox User<!--%hypertext -->
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews<A HREF="../"><IMG SRC="/images/apache_home.gif" ALT="Home"></A>
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User<A HREF="./"><IMG SRC="/images/apache_index.gif" ALT="Index"></A>
9ecb5d33470ebfb3719a1b8d56bcefdf4b27f7b2Tinderbox User<!--/%hypertext -->