[08254fc] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY apache-download-http "http://www.apache.org/dist/httpd/httpd-&apache-version;.tar.gz">
|
---|
| 8 | <!ENTITY apache-download-ftp "ftp://ftp.tux.org/pub/net/apache/dist/httpd/httpd-&apache-version;.tar.gz">
|
---|
[6c04e99] | 9 | <!ENTITY apache-size "5.9 MB">
|
---|
[08254fc] | 10 | <!ENTITY apache-buildsize "75 MB">
|
---|
| 11 | <!ENTITY apache-time "1.32 SBU">
|
---|
| 12 | ]>
|
---|
| 13 |
|
---|
[7c7fa7d] | 14 | <sect1 id="apache" xreflabel="Apache-&apache-version;">
|
---|
[00bb024c] | 15 | <?dbhtml filename="apache.html"?>
|
---|
[7c7fa7d] | 16 | <title>Apache-&apache-version;</title>
|
---|
[f45b1953] | 17 |
|
---|
[08254fc] | 18 | <sect2>
|
---|
| 19 | <title>Introduction to <application>Apache</application></title>
|
---|
| 20 |
|
---|
| 21 | <para>The <application>Apache</application> package contains an
|
---|
| 22 | open-source <acronym>HTTP</acronym> server. It is
|
---|
| 23 | useful for creating local intranet web sites or running huge web serving
|
---|
| 24 | operations.</para>
|
---|
| 25 |
|
---|
| 26 | <sect3><title>Package information</title>
|
---|
| 27 | <itemizedlist spacing='compact'>
|
---|
| 28 | <listitem><para>Download (HTTP): <ulink url="&apache-download-http;"/></para></listitem>
|
---|
| 29 | <listitem><para>Download (FTP): <ulink url="&apache-download-ftp;"/></para></listitem>
|
---|
| 30 | <listitem><para>Download size: &apache-size;</para></listitem>
|
---|
| 31 | <listitem><para>Estimated Disk space required: &apache-buildsize;</para></listitem>
|
---|
| 32 | <listitem><para>Estimated build time: &apache-time;</para></listitem></itemizedlist>
|
---|
| 33 | </sect3>
|
---|
| 34 |
|
---|
| 35 | <sect3><title>Additional downloads</title>
|
---|
| 36 | <itemizedlist spacing='compact'>
|
---|
| 37 | <listitem><para>Required Patch: <ulink
|
---|
[b1623c2] | 38 | url="&patch-root;/httpd-&apache-version;-config-1.patch"/></para></listitem>
|
---|
[08254fc] | 39 | </itemizedlist></sect3>
|
---|
| 40 |
|
---|
| 41 | <sect3><title><application>Apache</application> dependencies</title>
|
---|
| 42 | <sect4><title>Optional</title>
|
---|
[b1623c2] | 43 | <para><xref linkend="db"/> or <xref linkend="gdbm"/>, <xref linkend="openssl"/>,
|
---|
[6c04e99] | 44 | <xref linkend="openldap"/>, <xref linkend="expat"/> and
|
---|
| 45 | <ulink url="http://www.stack.nl/~dimitri/doxygen/">doxygen</ulink></para></sect4>
|
---|
[08254fc] | 46 | </sect3>
|
---|
| 47 |
|
---|
| 48 | </sect2>
|
---|
| 49 |
|
---|
| 50 | <sect2>
|
---|
| 51 | <title>Installation of <application>Apache</application></title>
|
---|
| 52 |
|
---|
[b1623c2] | 53 | <para>For security reasons, running the server as an unprivileged user and
|
---|
| 54 | group is strongly encouraged.</para>
|
---|
[08254fc] | 55 |
|
---|
| 56 | <screen><userinput><command>groupadd apache &&
|
---|
| 57 | useradd -c apache -d /dev/null -g apache -s /bin/false apache</command></userinput></screen>
|
---|
| 58 |
|
---|
| 59 | <para>The following patch will define the layout of destination directories
|
---|
| 60 | and, among them, the build directory at
|
---|
| 61 | <filename class="directory">/usr/lib/apache/build</filename>. This
|
---|
| 62 | will allow the modules added to <application>Apache</application> to
|
---|
| 63 | be configured without errors. Apply the patch:</para>
|
---|
| 64 |
|
---|
[b1623c2] | 65 | <screen><userinput><command>patch -Np1 -i ../httpd-&apache-version;-config-1.patch</command></userinput></screen>
|
---|
[08254fc] | 66 |
|
---|
[b1623c2] | 67 | <para>Build and install <application>Apache</application> by running the
|
---|
| 68 | following commands:</para>
|
---|
[08254fc] | 69 |
|
---|
| 70 | <screen><userinput><command>./configure --enable-layout=LFS \
|
---|
[b1623c2] | 71 | --enable-mods-shared=all &&
|
---|
[08254fc] | 72 | make &&
|
---|
| 73 | make install</command></userinput></screen>
|
---|
| 74 |
|
---|
| 75 | </sect2>
|
---|
| 76 |
|
---|
| 77 | <sect2>
|
---|
| 78 | <title>Command explanations</title>
|
---|
| 79 |
|
---|
| 80 | <para><parameter>--with-expat=/usr</parameter>: Uses system installed
|
---|
| 81 | expat. <emphasis>If you have installed expat and do not use this switch, the
|
---|
[b1623c2] | 82 | apache installation may overwrite some files from the expat
|
---|
| 83 | installation.</emphasis></para>
|
---|
| 84 |
|
---|
[08254fc] | 85 | <para><parameter>--enable-mods-shared=all</parameter>: We want modules
|
---|
| 86 | to be compiled and used as Dynamic Shared Objects
|
---|
| 87 | (<acronym>DSO</acronym>s) so they can be included and excluded from the
|
---|
[b1623c2] | 88 | server using the run-time configuration directives.</para>
|
---|
[08254fc] | 89 |
|
---|
| 90 | <para><parameter>--enable-ssl</parameter>: Use this switch
|
---|
| 91 | to create the <filename class="libraryfile">mod_ssl</filename>
|
---|
| 92 | module and enable <acronym>SSL</acronym> support.</para>
|
---|
| 93 |
|
---|
| 94 | </sect2>
|
---|
| 95 |
|
---|
| 96 | <sect2>
|
---|
| 97 | <title>Configuring <application>Apache</application></title>
|
---|
| 98 |
|
---|
| 99 | <sect3>
|
---|
| 100 | <title>Config files</title>
|
---|
| 101 |
|
---|
| 102 | <para><filename>/etc/apache/*</filename></para>
|
---|
| 103 |
|
---|
| 104 | </sect3>
|
---|
| 105 |
|
---|
| 106 | <sect3><title>Configuration Information</title>
|
---|
| 107 |
|
---|
| 108 | <para>The main configuration file is called
|
---|
| 109 | <filename>httpd.conf</filename>. Modify it to run the server as a
|
---|
| 110 | dedicated user:</para>
|
---|
| 111 |
|
---|
| 112 | <screen><userinput><command>sed -i -e "s%User nobody%User apache%" -e "s%^Group #-1%Group apache%" /etc/apache/httpd.conf</command></userinput></screen>
|
---|
[b1623c2] | 113 |
|
---|
[08254fc] | 114 | <para>See
|
---|
| 115 | <ulink url="http://httpd.apache.org/docs-2.0/configuring.html"/> for
|
---|
| 116 | detailed instructions on customizing your Apache <acronym>HTTP</acronym>
|
---|
| 117 | server.</para>
|
---|
| 118 |
|
---|
| 119 | <para>Install the <filename>/etc/rc.d/init.d/apache</filename>
|
---|
[b1623c2] | 120 | init script included in the <xref linkend="intro-important-bootscripts"/>
|
---|
| 121 | package.</para>
|
---|
| 122 |
|
---|
[08254fc] | 123 | <screen><userinput><command>make install-apache</command></userinput></screen>
|
---|
| 124 |
|
---|
| 125 | </sect3>
|
---|
| 126 |
|
---|
| 127 | </sect2>
|
---|
| 128 |
|
---|
| 129 | <sect2>
|
---|
| 130 | <title>Contents</title>
|
---|
| 131 |
|
---|
| 132 | <para>The <application>Apache</application> package provides
|
---|
| 133 | <command>ab</command>,
|
---|
| 134 | <command>apachectl</command>,
|
---|
| 135 | <command>apr-config</command>,
|
---|
| 136 | <command>apu-config</command>,
|
---|
| 137 | <command>apxs</command>,
|
---|
| 138 | <command>checkgid</command>,
|
---|
| 139 | <command>dbmmanage</command>,
|
---|
| 140 | <command>htdbm</command>,
|
---|
| 141 | <command>htdigest</command>,
|
---|
| 142 | <command>htpasswd</command>,
|
---|
| 143 | <command>httpd</command>,
|
---|
| 144 | <command>instdso.sh</command>,
|
---|
| 145 | <command>logresolve</command>,
|
---|
| 146 | <command>rotatelogs</command>,
|
---|
| 147 | <filename class="libraryfile">libapr</filename>,
|
---|
| 148 | <filename class="libraryfile">libaprutil</filename> and
|
---|
| 149 | various modules.</para>
|
---|
| 150 | </sect2>
|
---|
| 151 |
|
---|
| 152 | <sect2><title>Description</title>
|
---|
| 153 |
|
---|
| 154 | <sect3><title>ab</title>
|
---|
| 155 | <para><command>ab</command> is a tool for benchmarking your
|
---|
| 156 | <application>Apache</application> <acronym>HTTP</acronym> server.
|
---|
| 157 | </para></sect3>
|
---|
| 158 |
|
---|
| 159 | <sect3><title>apachectl</title>
|
---|
| 160 | <para><command>apachectl</command> is a front end to the
|
---|
| 161 | <application>Apache</application> <acronym>HTTP</acronym>
|
---|
| 162 | server which is designed to help the administrator control the
|
---|
| 163 | functioning of the <application>Apache</application> httpd daemon.</para></sect3>
|
---|
| 164 |
|
---|
| 165 | <sect3><title>apxs</title>
|
---|
| 166 | <para><command>apxs</command>
|
---|
| 167 | is a tool for building and installing extension modules for the
|
---|
| 168 | <application>Apache</application> <acronym>HTTP</acronym> server.</para></sect3>
|
---|
| 169 |
|
---|
| 170 | <sect3><title>dbmmanage</title>
|
---|
| 171 | <para><command>dbmmanage</command> is used to create and update the
|
---|
| 172 | <filename>DBM</filename> format files used to store usernames and passwords
|
---|
| 173 | for basic authentication of <acronym>HTTP</acronym>
|
---|
| 174 | users.</para></sect3>
|
---|
| 175 |
|
---|
| 176 | <sect3><title>htdigest</title>
|
---|
| 177 | <para><command>htdigest</command> is used to create and update the
|
---|
| 178 | flat-files used to store usernames, realms and passwords for digest
|
---|
| 179 | authentication of <acronym>HTTP</acronym> users.</para></sect3>
|
---|
| 180 |
|
---|
| 181 | <sect3><title>htpasswd</title>
|
---|
| 182 | <para><command>htpasswd</command> is used to create and update the
|
---|
| 183 | flat-files used to store usernames and passwords for basic authentication of
|
---|
| 184 | <acronym>HTTP</acronym> users.</para></sect3>
|
---|
| 185 |
|
---|
| 186 | <sect3><title>httpd</title>
|
---|
[b1623c2] | 187 | <para><command>httpd</command> is the <application>Apache</application>
|
---|
| 188 | <acronym>HTTP</acronym> server program.</para></sect3>
|
---|
[08254fc] | 189 |
|
---|
| 190 | <sect3><title>instdso.sh</title>
|
---|
| 191 | <para><command>instdso.sh</command> is a script which installs
|
---|
| 192 | <application>Apache</application> <acronym>DSO</acronym> modules.</para></sect3>
|
---|
| 193 |
|
---|
| 194 | <sect3><title>logresolve</title>
|
---|
| 195 | <para><command>logresolve</command> is a post-processing program to
|
---|
[b1623c2] | 196 | resolve <acronym>IP</acronym>-addresses in <application>Apache</application>'s
|
---|
| 197 | access log files.</para></sect3>
|
---|
[08254fc] | 198 |
|
---|
| 199 | <sect3><title>rotatelogs</title>
|
---|
[b1623c2] | 200 | <para><command>rotatelogs</command> is a simple program for use in conjunction
|
---|
| 201 | with <application>Apache</application>'s piped log file feature.</para></sect3>
|
---|
[08254fc] | 202 |
|
---|
| 203 | </sect2>
|
---|
[f45b1953] | 204 |
|
---|
| 205 | </sect1>
|
---|