source: content/web/apache.xml@ 4fb9a95

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 4fb9a95 was 4fb9a95, checked in by Randy McMurchy <randy@…>, 20 years ago

Updated to Apache-2.0.51; modified commands in Thunderbird instructions to fit on a printed page

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2746 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 8.4 KB
Line 
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">
9 <!ENTITY apache-size "6.7 MB">
10 <!ENTITY apache-buildsize "78 MB">
11 <!ENTITY apache-time "1.12 SBU">
12]>
13
14<sect1 id="apache" xreflabel="Apache-&apache-version;">
15<sect1info>
16<othername>$LastChangedBy$</othername>
17<date>$Date$</date>
18</sect1info>
19<?dbhtml filename="apache.html"?>
20<title>Apache-&apache-version;</title>
21
22<sect2>
23<title>Introduction to <application>Apache</application></title>
24
25<para>The <application>Apache</application> package contains an
26open-source <acronym>HTTP</acronym> server. It is
27useful for creating local intranet web sites or running huge web serving
28operations.</para>
29
30<sect3><title>Package information</title>
31<itemizedlist spacing='compact'>
32<listitem><para>Download (HTTP):
33<ulink url="&apache-download-http;"/></para></listitem>
34<listitem><para>Download (FTP):
35<ulink url="&apache-download-ftp;"/></para></listitem>
36<listitem><para>Download size: &apache-size;</para></listitem>
37<listitem><para>Estimated Disk space required:
38&apache-buildsize;</para></listitem>
39<listitem><para>Estimated build time: &apache-time;</para></listitem>
40</itemizedlist>
41</sect3>
42
43<sect3><title>Additional downloads</title>
44<itemizedlist spacing='compact'>
45<listitem><para>Required Patch: <ulink
46url="&patch-root;/httpd-&apache-version;-config-1.patch"/></para></listitem>
47</itemizedlist></sect3>
48
49<sect3><title><application>Apache</application> dependencies</title>
50<sect4><title>Optional</title>
51<para><xref linkend="db"/> or <xref linkend="gdbm"/>,
52<xref linkend="openssl"/>,
53<xref linkend="openldap"/>,
54<xref linkend="expat"/> and
55<ulink url="http://www.stack.nl/~dimitri/doxygen/">doxygen</ulink></para>
56</sect4>
57</sect3>
58
59</sect2>
60
61<sect2>
62<title>Installation of <application>Apache</application></title>
63
64<para>For security reasons, running the server as an unprivileged user and
65group is strongly encouraged.</para>
66
67<screen><userinput><command>groupadd apache &amp;&amp;
68useradd -c apache -d /dev/null -g apache -s /bin/false apache</command></userinput></screen>
69
70<para>The following patch will define the layout of destination directories
71and, among them, the build directory at
72<filename class="directory">/usr/lib/apache/build</filename>. This
73will allow the modules added to <application>Apache</application> to
74be configured without errors. Apply the patch:</para>
75
76<screen><userinput><command>patch -Np1 -i ../httpd-&apache-version;-config-1.patch</command></userinput></screen>
77
78<para>Build and install <application>Apache</application> by running the
79following commands:</para>
80
81<screen><userinput><command>./configure --enable-layout=FHS \
82 --enable-mods-shared=all &amp;&amp;
83make &amp;&amp;
84make install &amp;&amp;
85chown root:root /usr/sbin/{apxs,apachectl,dbmmanage,envvars-std,envvars} &amp;&amp;
86chown -R apache:apache /srv/www</command></userinput></screen>
87
88</sect2>
89
90<sect2>
91<title>Command explanations</title>
92
93<para><option>--with-expat=/usr</option>: Uses system installed
94<application>expat</application>. <emphasis>If you have installed
95<application>expat</application> and do not use this switch, the
96<application>Apache</application> installation may overwrite some files from
97the <application>expat</application> installation.</emphasis></para>
98
99<para><parameter>--enable-mods-shared=all</parameter>: The modules should be
100compiled and used as Dynamic Shared Objects
101(<acronym>DSO</acronym>s) so they can be included and excluded from the
102server using the run-time configuration directives.</para>
103
104<para><option>--enable-ssl</option>: Use this switch
105to create the <filename class="libraryfile">mod_ssl</filename>
106module and enable <acronym>SSL</acronym> support.</para>
107
108<para><command>chown root:root /usr/sbin/{...}</command>: This command changes
109the ownership of some installed files, the result of building the package as a
110user other than root.</para>
111
112<para><command>chown -R apache:apache /srv/www</command>: By default, the
113installation process installs files (documentation, error messages, default
114icons, etc.) with the ownership of the user that extracted the files from the
115tar file. If you want to change the ownership to another user, you should do
116so at this point. The only requirement is that the document directories need
117to be accessable by the <command>httpd</command> process with (r-x) permissions
118and files need to be readable (r--) by the apache user.</para>
119
120</sect2>
121
122<sect2>
123<title>Configuring <application>Apache</application></title>
124
125<sect3>
126<title>Config files</title>
127
128<para><filename>/etc/apache/*</filename></para>
129
130</sect3>
131
132<sect3>
133<title>Configuration Information</title>
134
135<para>The main configuration file is named <filename>httpd.conf</filename>.
136Modify it to run the server as a dedicated user:</para>
137
138<screen><userinput><command>sed -i -e "s%User nobody%User apache%" \
139 -e "s%^Group #-1%Group apache%" \
140 /etc/apache/httpd.conf</command></userinput></screen>
141
142<para>See <ulink url="http://httpd.apache.org/docs-2.0/configuring.html"/> for
143detailed instructions on customizing your <application>Apache</application>
144<acronym>HTTP</acronym> server.</para>
145
146<para>Install the <filename>/etc/rc.d/init.d/apache</filename>
147init script included in the <xref linkend="intro-important-bootscripts"/>
148package.</para>
149
150<screen><userinput><command>make install-apache</command></userinput></screen>
151</sect3>
152
153</sect2>
154
155<sect2>
156<title>Contents</title>
157
158<para>The <application>Apache</application> package provides
159<command>ab</command>,
160<command>apachectl</command>,
161<command>apr-config</command>,
162<command>apu-config</command>,
163<command>apxs</command>,
164<command>checkgid</command>,
165<command>dbmmanage</command>,
166<command>htdbm</command>,
167<command>htdigest</command>,
168<command>htpasswd</command>,
169<command>httpd</command>,
170<command>instdso.sh</command>,
171<command>logresolve</command>,
172<command>rotatelogs</command>,
173<filename class="libraryfile">libapr</filename>,
174<filename class="libraryfile">libaprutil</filename> and
175various modules.</para>
176</sect2>
177
178<sect2><title>Description</title>
179
180<sect3><title>ab</title>
181<para><command>ab</command> is a tool for benchmarking your
182<application>Apache</application> <acronym>HTTP</acronym> server.
183</para></sect3>
184
185<sect3><title>apachectl</title>
186<para><command>apachectl</command> is a front end to the
187<application>Apache</application> <acronym>HTTP</acronym>
188server which is designed to help the administrator control the
189functioning of the <application>Apache</application> httpd daemon.</para>
190</sect3>
191
192<sect3><title>apxs</title>
193<para><command>apxs</command>
194is a tool for building and installing extension modules for the
195<application>Apache</application> <acronym>HTTP</acronym> server.</para></sect3>
196
197<sect3><title>dbmmanage</title>
198<para><command>dbmmanage</command> is used to create and update the
199<filename>DBM</filename> format files used to store usernames and passwords
200for basic authentication of <acronym>HTTP</acronym>
201users.</para></sect3>
202
203<sect3><title>htdigest</title>
204<para><command>htdigest</command> is used to create and update the
205flat-files used to store usernames, realms and passwords for digest
206authentication of <acronym>HTTP</acronym> users.</para></sect3>
207
208<sect3><title>htpasswd</title>
209<para><command>htpasswd</command> is used to create and update the
210flat-files used to store usernames and passwords for basic authentication of
211<acronym>HTTP</acronym> users.</para></sect3>
212
213<sect3><title>httpd</title>
214<para><command>httpd</command> is the <application>Apache</application>
215<acronym>HTTP</acronym> server program.</para></sect3>
216
217<sect3><title>instdso.sh</title>
218<para><command>instdso.sh</command> is a script which installs
219<application>Apache</application> <acronym>DSO</acronym> modules.</para></sect3>
220
221<sect3><title>logresolve</title>
222<para><command>logresolve</command> is a post-processing program to
223resolve <acronym>IP</acronym>-addresses in <application>Apache</application>'s
224access log files.</para></sect3>
225
226<sect3><title>rotatelogs</title>
227<para><command>rotatelogs</command> is a simple program for use in conjunction
228with <application>Apache</application>'s piped log file feature.</para></sect3>
229
230</sect2>
231
232</sect1>
Note: See TracBrowser for help on using the repository browser.