Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 59306 Details for
Bug 93001
New Gentoo Apache Documentation
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Apache Doc Version 1.2
apache-conf-1.2.xml (text/xml), 11.44 KB, created by
Wham
on 2005-05-19 07:08:07 UTC
(
hide
)
Description:
Apache Doc Version 1.2
Filename:
MIME Type:
Creator:
Wham
Created:
2005-05-19 07:08:07 UTC
Size:
11.44 KB
patch
obsolete
><?xml version="1.0" encoding="UTF-8"?> > ><!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> ><!-- $Header$ --> > ><guide link="/doc/en/apache-conf.xml" lang="en"> > ><title>Personal Apache Web Server Guide</title> > ><author title="Author"> > <mail link="HenryH01@gmail.com">Henry H.</mail> ></author> > ><abstract> >This guide will instruct users on howto deploy an Apache web server from home >for various uses. ></abstract> > ><!-- The content of this document is licensed under the CC-BY-SA license --> ><!-- See http://creativecommons.org/licenses/by-sa/2.0 --> ><license/> > ><version>1.2</version> ><date>2005-05-19</date> > ><!-- >TODO: add content on more configuration, possibly a FAQ, and security >--> > ><chapter> ><title>Introduction</title> ><section> ><title>A brief Introduction to Apache</title> ><body> > ><warn>THIS IS A DRAFT DOCUMENT AND NOTHING IN THIS DOCUMENT IS FINALIZED. THERE >COULD QUITE POSSIBLY BE MANY ERRORS IN THIS DOCUMENT RESULTING IN PROBLEMS. >USERS WHO WISH TO INSTALL APACHE SHOULD CONSULT THE GENTOO FORUMS OR >IRC.</warn> > ><p> >Apache is by far the most popular web server on the Internet. As of February >2005, Netcraft has reported more than 68% of sites surveyed use Apache. ></p> > ><p> >This guide is ultimately aimed at the home user who wants to put up a >personal webpage from home. With the widespread increase of broadband and >Linux, more and more people can start putting up personal webpages for >blogging, home-made picture albums, hobby sites, etc from the comforts of >their home. ></p> > ><p> >Average users may think operating their own HTTP server is a lot more >difficult and time consuming than it really is; the truth is if the user just >wants static content, it is not too difficult. ></p> > ><p> >Users should consider this guide a general, quick, and easy way to get started >with Apache. Full-blown websites involve a lot of work in configuring and >securing, but this guide will make it easy for users to get started with the >basics. ></p> > ></body> ></section> ></chapter> > ><chapter> ><title>Installing Apache</title> ><section> ><title>Apache Versions</title> ><body> > ><p> >There are two stable versions of apache currently in use - Apache1 and Apache2. >Gentoo provides ebuilds for both of these; Apache 2 will be used. Apache1 is >primarily used for situations where a special mod or very unusual config is >used, and we will be using neither. ></p> > ><p>Lately, the Gentoo Apache team has been putting the Apache ebuilds through >some various changes. Some changes being made include the installation paths >for Apache; to better reflect standards among other Linux distros. Users should >take note of the changes listed below. ></p> > ><table> ><tr> > <th>Apache 1.x Paths</th> > <th>Old Path</th> > <th>New Path</th> ></tr> ><tr> > <ti>Server Root</ti> > <ti>/etc/apache/</ti> > <ti>/usr/lib/apache/</ti> ></tr> ><tr> > <ti>Configuration Directory</ti> > <ti>/etc/apache/conf/</ti> > <ti>/etc/apache/</ti> ></tr> ><tr> > <ti>Configuration</ti> > <ti>/etc/apache/conf/apache.conf</ti> > <ti>/etc/apache/httpd.conf</ti> ></tr> ><tr> > <ti>Configuration</ti> > <ti>/etc/apache/conf/commonplace.conf</ti> > <ti>/etc/apache/httpd.conf</ti> ></tr> ><tr> > <ti>Vhosts Configuration</ti> > <ti>/etc/apache/conf/vhosts/</ti> > <ti>/etc/apache/vhosts.d/</ti> ></tr> ><tr> > <ti>Modules Configuration</ti> > <ti>/etc/apache/conf/addon-modules/</ti> > <ti>/etc/apache/modules.d/</ti> ></tr> ><tr> > <ti>Module Binaries</ti> > <ti>/usr/lib/apache-extramodules/</ti> > <ti>/usr/lib/apache/modules/</ti> ></tr> ></table> > ><table> ><tr> > <th>Apache 2.x Paths</th> > <th>Old (Versions 2.0.54-r4 or older)</th> > <th>New (Versions 2.0.54-r5 or newer)</th> ></tr> ><tr> > <ti>Server Root</ti> > <ti>/etc/apache2/</ti> > <ti>/usr/lib/apache2/</ti> ></tr> ><tr> > <ti>Configuration Directory</ti> > <ti>/etc/apache2/conf/</ti> > <ti>/etc/apache2/</ti> ></tr> ><tr> > <ti>Configuration</ti> > <ti>/etc/apache2/conf/apache2.conf</ti> > <ti>/etc/apache2/httpd.conf</ti> ></tr> ><tr> > <ti>Configuration</ti> > <ti>/etc/apache2/conf/commonplace2.conf</ti> > <ti>/etc/apache2/httpd.conf</ti> ></tr> ><tr> > <ti>Vhosts Configuration</ti> > <ti>/etc/apache2/conf/vhosts/</ti> > <ti>/etc/apache2/vhosts.d/</ti> ></tr> ><tr> > <ti>Modules Configuration</ti> > <ti>/etc/apache2/conf/modules.d/</ti> > <ti>/etc/apache2/modules.d/</ti> ></tr> ><tr> > <ti>Module Binaries</ti> > <ti>/usr/lib/apache2-extramodules/</ti> > <ti>/usr/lib/apache2/modules/</ti> ></tr> ></table> > ><impo>As of this writing, 2.0.54-r4 is the stable build for Apache2. For the >purposes of this writing, the old style paths will be used until 2.0.54-r5 >is stable.</impo> > ><note>Users should notice that in the transition from old style to new style >in Apache2; the configuration files apache2.conf and commonplace2.conf have >been combined to httpd.conf in the new version</note> > ></body> ></section> ><section> ><title>USE Flags</title> ><body> > ><p> >Generally, there are going to be a couple USE flags the user should be aware >of before emerging Apache. Please enable the following flags as needed. ></p> > ><table> ><tr> > <th>USE Flag</th> > <th>Description</th> ></tr> ><tr> > <ti>ipv6</ti> > <ti>Enable IPv6 support for IP addresses</ti> ></tr> ><tr> > <ti>ssl</ti> > <ti>Enable Secure Socket Layer support for webpages</ti> ></tr> ><tr> > <ti>berkdb</ti> > <ti>Enable Berkeley Database support</ti> ></tr> ><tr> > <ti>ldap</ti> > <ti>Enable LDAP (Lightweight Directory Access Protocol) Support</ti> ></tr> ></table> > ><note> >If users do not know what any of the above flag descriptions are referring to, >then it is ok to ignore them, as it probably is not needed. If at a later time >the need arises for any of the above flags, users can always enable the flag(s) >and re-emerge Apache. ></note> > ><pre caption="Editing /etc/make.conf"> ><comment>(Add the following, as needed)</comment> >USE="ipv6 ssl berkdb ldap" ></pre> > ></body> ></section> ><section> ><title>Emerging Apache</title> ><body> > ><p> >Compile time will vary from system to system but if a general estimate is >needed, an AMD 1.33Ghz t-bird with 512mb of RAM takes about 10 min. ></p> > ><pre caption="Emerging Apache"> ># <i>emerge apache</i> ></pre> > ></body> ></section> ></chapter> > ><chapter> ><title>Configuration</title> ><section> ><title>Basic Config</title> ><body> > ><p> >In this Chapter, basic configuration options will be given. The main >configuration file is located at <path>/etc/apache2/conf/apache2.conf</path>. ></p> > > ><impo>All of the following modifications will be made in the apache2.conf >file!</impo> > > ><p> >The first thing users will want to do is to select an IP address and Port >for the Apache server to listen in on. ></p> > ><note>Selecting an IP/Port for Apache to listen on is called Binding.</note> > ><pre caption="Configuring which IP/Port to Listen on"> ><comment># The listen directive is used to choose IP/Port. Most users only have ># 1 IP address on their computer. If so, the only thing that needs to be set is ># the Port. The following will set Apache to listen in on Port 80.</comment> >Listen 80 > ><comment># If the user would like Apache to listen on another port in addition ># to port 80 then add another Listen line. Apache now listens on Port 8000 and ># port if the user kept both lines in the config.</comment> >Listen 8000 > ><comment># If users have multiple IPs then the following syntax can be >used.</comment> >Listen 192.168.0.20:80 >Listen 192.168.0.150:8000 ></pre> > ></body> ></section> ><section> ><title> Setting the location of the HTML and related files</title> ><body> > ><p> >The DocumentRoot directive determines where the HTTP related files will go on >the system. Users can change the location of files to whatever they feel, >however the default location is fine as is. ></p> > ><pre caption="Setting HTTP file location"> ><comment># This is the default location in the config file</comment> >DocumentRoot /var/www/localhost/htdocs > ><comment># The location could be changed to a directory located in a user's ># home directory as follows.</comment> >DocumentRoot /home/user/www ></pre> > ></body> ></section> ><section> ><title>Setting Apache to run on startup</title> ><body> > ><p> >If the user would like Apache to startup each time the Gentoo system is brought >up, adding Apache to the runlevel is needed. ></p> > ><pre caption="Adding Apache to startup"> ># <i>rc-update add apache2 default</i> ></pre> > ></body> ></section> ><section> ><title>Where to insert HTML files</title> ><body> > ><p> >By now the user has a very basic setup for Apache and all that is needed is >to add whatever files the user chooses. If the user kept the default path >location mentioned in this guide then the document root for all Apache files is >located at <path>/var/www/localhost/htdocs</path> ></p> > ><p> >For now, the user does not have to place anything in the DocumentRoot location. >HTTP related files can be inserted whenever, but the default files at ><path>/var/www/localhost/htdocs</path> are more than enough to get an idea of >how to start. ></p> > ></body> ></section> ><section> ><title>Starting up Apache</title> ><body> > ><p> >It is now time for the user to start up the Apache server. ></p> > ><pre caption="Starting Apache"> ># <i>/etc/init.d/apache2 start</i> ></pre> > ><note> >Apache can just as easily be brought down with the following command. ></note> > ><pre caption="Stopping Apache"> ># <i>/etc/init.d/apache2 stop</i> ></pre> > ></body> ></section> ><section> ><title>Browsing to a fresh new page</title> ><body> > ><p> >If the user kept the configuration file to default so that Apache listens to >port 80 and the DocumentRoot directive is left untouched then the user can >immediately begin to test the newly started server. ></p> > ><p> >Users should open up their browser of choice and enter in <c>127.0.0.1</c> as >the HTTP address. The browser should immediately load a default page stating in >the first sentence that the installation of the Apache web server is a success. ></p> > ><note> >The user can also enter in their IP as listed in ifconfig; this is usually >eth0. ></note> > ></body> ></section> ><section> ><title>Restricting Apache to localhost</title> ><body> > ><p> >If the user would like to setup an Apache server for testing and would like to >restrict access to just the local computer it can easily be done by using the >Listen directive in the <path>apache2.conf</path>. ></p> > ><pre caption="Restricting Access to localhost only"> ><comment># 127.0.0.1 is the local loopback address to your computer</comment> >Listen 127.0.0.1:80 ></pre> > ></body> ></section> ><section> ><title>Keeping track of Apache</title> ><body> > ><p> >It can be helpful to monitor the apache server for security or debugging web >applications through the error log. By default, the error log is located in ><path>/var/log/apache2/error_log</path>. There are also varying levels of >log detail which are available. ></p> > ><pre caption="Setting Log Detail in apache2.conf"> ><comment># Default warning level is "warn"</comment> >LogLevel warn > ><comment># Highest warning level is "emerg"</comment> >LogLevel emerg ></pre> > ><p> >The following table illustrates the various warning levels from highest to >lowest in top-down order. ></p> > ><table> ><tr> > <th>Warning Levels</th> ></tr> ><tr> > <ti>emerg</ti> ></tr> ><tr> > <ti>alert</ti> ></tr> ><tr> > <ti>crit</ti> ></tr> ><tr> > <ti>error</ti> ></tr> ><tr> > <ti>warn</ti> ></tr> ><tr> > <ti>notice</ti> ></tr> ><tr> > <ti>info</ti> ></tr> ><tr> > <ti>debug</ti> ></tr> ></table> > ><p> >To actively monitor the Apache log file, execute the following command: ></p> > ><pre caption="Monitoring the Apache log"> ># <i>tail -f /var/log/apache2/error_log</i> ></pre> > ></body> ></section> ><section> ><title>Summary</title> ><body> > ><p> >Congratulations on a painless, quick start on Apache. ></p> > ><p> >Please direct all bug reports to Gentoo's <uri link="http://bugs.gentoo.org">Bugzilla</uri>. ></p> > ></body> ></section> ></chapter> ></guide>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 93001
:
59161
|
59172
|
59173
|
59206
| 59306