source: content/web/apache.xml@ 9b893e9

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 9b893e9 was 9b893e9, checked in by Randy McMurchy <randy@…>, 20 years ago

Modified chown command in Apache instructions to change ownership of more files

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

  • Property mode set to 100644
File size: 8.6 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} \
86 /usr/include/apache/* /usr/lib/apache/httpd.exp \
87 /usr/share/man/man1/{dbmmanage,htdigest,htpasswd}.1 \
88 /usr/share/man/man8/{ab,apachectl,apxs,httpd,logresolve,rotatelogs,suexec}.8 &amp;&amp;
89chown -R apache:apache /srv/www</command></userinput></screen>
90
91</sect2>
92
93<sect2>
94<title>Command explanations</title>
95
96<para><option>--with-expat=/usr</option>: Uses system installed
97<application>expat</application>. <emphasis>If you have installed
98<application>expat</application> and do not use this switch, the
99<application>Apache</application> installation may overwrite some files from
100the <application>expat</application> installation.</emphasis></para>
101
102<para><parameter>--enable-mods-shared=all</parameter>: The modules should be
103compiled and used as Dynamic Shared Objects
104(<acronym>DSO</acronym>s) so they can be included and excluded from the
105server using the run-time configuration directives.</para>
106
107<para><option>--enable-ssl</option>: Use this switch
108to create the <filename class="libraryfile">mod_ssl</filename>
109module and enable <acronym>SSL</acronym> support.</para>
110
111<para><command>chown root:root ...</command>: This command changes
112the ownership of some installed files, the result of building the package as a
113user other than root.</para>
114
115<para><command>chown -R apache:apache /srv/www</command>: By default, the
116installation process installs files (documentation, error messages, default
117icons, etc.) with the ownership of the user that extracted the files from the
118tar file. If you want to change the ownership to another user, you should do
119so at this point. The only requirement is that the document directories need
120to be accessable by the <command>httpd</command> process with (r-x) permissions
121and files need to be readable (r--) by the apache user.</para>
122
123</sect2>
124
125<sect2>
126<title>Configuring <application>Apache</application></title>
127
128<sect3>
129<title>Config files</title>
130
131<para><filename>/etc/apache/*</filename></para>
132
133</sect3>
134
135<sect3>
136<title>Configuration Information</title>
137
138<para>The main configuration file is named <filename>httpd.conf</filename>.
139Modify it to run the server as a dedicated user:</para>
140
141<screen><userinput><command>sed -i -e "s%User nobody%User apache%" \
142 -e "s%^Group #-1%Group apache%" \
143 /etc/apache/httpd.conf</command></userinput></screen>
144
145<para>See <ulink url="http://httpd.apache.org/docs-2.0/configuring.html"/> for
146detailed instructions on customizing your <application>Apache</application>
147<acronym>HTTP</acronym> server.</para>
148
149<para>Install the <filename>/etc/rc.d/init.d/apache</filename>
150init script included in the <xref linkend="intro-important-bootscripts"/>
151package.</para>
152
153<screen><userinput><command>make install-apache</command></userinput></screen>
154</sect3>
155
156</sect2>
157
158<sect2>
159<title>Contents</title>
160
161<para>The <application>Apache</application> package provides
162<command>ab</command>,
163<command>apachectl</command>,
164<command>apr-config</command>,
165<command>apu-config</command>,
166<command>apxs</command>,
167<command>checkgid</command>,
168<command>dbmmanage</command>,
169<command>htdbm</command>,
170<command>htdigest</command>,
171<command>htpasswd</command>,
172<command>httpd</command>,
173<command>instdso.sh</command>,
174<command>logresolve</command>,
175<command>rotatelogs</command>,
176<filename class="libraryfile">libapr</filename>,
177<filename class="libraryfile">libaprutil</filename> and
178various modules.</para>
179</sect2>
180
181<sect2><title>Description</title>
182
183<sect3><title>ab</title>
184<para><command>ab</command> is a tool for benchmarking your
185<application>Apache</application> <acronym>HTTP</acronym> server.
186</para></sect3>
187
188<sect3><title>apachectl</title>
189<para><command>apachectl</command> is a front end to the
190<application>Apache</application> <acronym>HTTP</acronym>
191server which is designed to help the administrator control the
192functioning of the <application>Apache</application> httpd daemon.</para>
193</sect3>
194
195<sect3><title>apxs</title>
196<para><command>apxs</command>
197is a tool for building and installing extension modules for the
198<application>Apache</application> <acronym>HTTP</acronym> server.</para></sect3>
199
200<sect3><title>dbmmanage</title>
201<para><command>dbmmanage</command> is used to create and update the
202<filename>DBM</filename> format files used to store usernames and passwords
203for basic authentication of <acronym>HTTP</acronym>
204users.</para></sect3>
205
206<sect3><title>htdigest</title>
207<para><command>htdigest</command> is used to create and update the
208flat-files used to store usernames, realms and passwords for digest
209authentication of <acronym>HTTP</acronym> users.</para></sect3>
210
211<sect3><title>htpasswd</title>
212<para><command>htpasswd</command> is used to create and update the
213flat-files used to store usernames and passwords for basic authentication of
214<acronym>HTTP</acronym> users.</para></sect3>
215
216<sect3><title>httpd</title>
217<para><command>httpd</command> is the <application>Apache</application>
218<acronym>HTTP</acronym> server program.</para></sect3>
219
220<sect3><title>instdso.sh</title>
221<para><command>instdso.sh</command> is a script which installs
222<application>Apache</application> <acronym>DSO</acronym> modules.</para></sect3>
223
224<sect3><title>logresolve</title>
225<para><command>logresolve</command> is a post-processing program to
226resolve <acronym>IP</acronym>-addresses in <application>Apache</application>'s
227access log files.</para></sect3>
228
229<sect3><title>rotatelogs</title>
230<para><command>rotatelogs</command> is a simple program for use in conjunction
231with <application>Apache</application>'s piped log file feature.</para></sect3>
232
233</sect2>
234
235</sect1>
Note: See TracBrowser for help on using the repository browser.