glfs/content/web/apache/apache-config.xml
Igor Živković ff3fa53882 update to Apache-2.0.47
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1050 af4574ff-66df-0310-9fd7-8a98e5e911e0
2003-09-13 00:39:14 +00:00

76 lines
2.1 KiB
XML

<sect2>
<title>Configuring Apache</title>
<sect3>
<title>Config files</title>
<para><filename>/etc/apache/*</filename></para>
</sect3>
<sect3><title>Configuration Information</title>
<para>The main configuration file is called
<filename>httpd.conf</filename>. See
<ulink
url="http://httpd.apache.org/docs-2.0/configuring.html">http://httpd.apache.org/docs-2.0/configuring.html</ulink> for detailed
instructions on customizing your Apache <acronym>HTTP</acronym>
server.</para>
<para>To automate the running of Apache, use the following command to
create the init.d script:</para>
<screen><userinput><command>cat &gt; /etc/rc.d/init.d/apache &lt;&lt; "EOF"
#!/bin/bash
source /etc/sysconfig/rc
source $rc_functions
case "$1" in
start)
echo "Starting Apache daemon..."
/usr/sbin/apachectl -k start
evaluate_retval
;;
stop)
echo "Stopping Apache daemon..."
/usr/sbin/apachectl -k stop
evaluate_retval
;;
restart)
echo "Restarting Apache daemon..."
/usr/sbin/apachectl -k restart
evaluate_retval
;;
status)
statusproc /usr/sbin/httpd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
EOF
chmod 755 /etc/rc.d/init.d/apache</command></userinput></screen>
<para>Create the symbolic links to this file in the relevant
<filename class="directory">rc.d</filename> directory
with the following commands:</para>
<screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
ln -sf ../init.d/apache ../rc0.d/K28apache &amp;&amp;
ln -sf ../init.d/apache ../rc1.d/K28apache &amp;&amp;
ln -sf ../init.d/apache ../rc2.d/K28apache &amp;&amp;
ln -sf ../init.d/apache ../rc3.d/S32apache &amp;&amp;
ln -sf ../init.d/apache ../rc4.d/S32apache &amp;&amp;
ln -sf ../init.d/apache ../rc5.d/S32apache &amp;&amp;
ln -sf ../init.d/apache ../rc6.d/K28apache</command></userinput></screen>
</sect3>
</sect2>