Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 59161 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]
First Draft of Apache document
apache.xml (text/plain), 9.17 KB, created by
Wham
on 2005-05-17 16:49:22 UTC
(
hide
)
Description:
First Draft of Apache document
Filename:
MIME Type:
Creator:
Wham
Created:
2005-05-17 16:49:22 UTC
Size:
9.17 KB
patch
obsolete
><?xml version="1.0" encoding="UTF-8"?> > ><!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> ><!-- $Header$ --> > ><guide link="/doc/en/apache.xml" lang="en"> > ><title>Personal Apache Web Server Guide</title> > ><author title="Author"> > <mail link="Henry@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.0</version> ><date>2005-05-17</date> > ><chapter> ><title>Introduction</title> ><section> ><title>A brief Introduction to Apache</title> ><body> > ><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. Due to >it's open source nature and wide popularity it stands to reason why shouldn't >a guide for apache installation should be made. ></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. ></p> > ><p> >Average users may think operating your own HTTP server is a lot more >difficult and time consuming than it really is but the truth is if you just >want to host pictures of the family then it really is not 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>Getting Started</title> ><body> > ><p> >Fortunately, Apache is available in portage and users are urged to get the >latest version available in portage so that the latest stable bug fixes and >security patches are installed. ></p> > ><pre caption="Grabbing the latest version"> ># <i>emerge sync</i> ></pre> > ></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 that apply. ></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 SSL 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 you do not know what any of the above flag descriptions are referring to >then it is ok to ignore them. If at a later time the need arises for any of >the above flags you can always enable the flag and re-emerge Apache. ></note> > ><p> >Please add the appropiate USE flags to your <path>/etc/make.conf</path> file >under the USE category. ></p> > ></body> ></section> ><section> ><title>Emerging Apache</title> ><body> > ><p> >Compile time will vary from system to system but if you need a general >estimate on compile time, an AMD 1.33Ghz Thunderbird 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> >After Apache has been emerged the user should be made aware of how to >configure the Apache server. In this Chapter basic configuration options >will be given. The main configuration file is located at <path>/etc/apache2/conf/apache2.conf</path>. ></p> > ><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 and Port for Apache to listen on is called Binding.</note> > ><pre caption="Configuring which IP/Port to Listen on"> ><comment># The listen directive is what is used to choose IP/Port.</comment> ><comment># Most users only have 1 IP address on their computer so the only</comment> ><comment># thing that needs to be set is the Port. The following will set</comment> ><comment># Apache to listen in on Port 80. There is no need to specify</comment> ><comment># an IP address since there is only 1 available on the computer.</comment> >Listen 80 > ><comment># If the user would like Apache to listen on another port in addition</comment> ><comment># to port 80 then add another Listen line. Apache now listens on</comment> ><comment># Port 8000 and Port 80 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. ></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</comment> ><comment># 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 Linux system is brought >up then 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 the very basics setup for Apache and now all that is >needed is for the user to add whatever files he or she chooses. The document >root for all Apache files is located at <path>/var/www/localhost/htdocs</path> >if the user kept the default path location mentioned in this guide. ></p> > ><p> >For now the user does not have to place anything in the DocumentRoot location. >HTTP related files can be inserted whenever but for now 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> > ><p> >Apache can just as easily be brought down with the following command. ></p> > ><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 is left untouched then the user can immediately >begin to test the newly started server. ></p> > ><p> >Users should open up their favorite browser and enter in 127.0.0.1 into the >browser 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 usually on >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 apache2.conf. ></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 your Apache</title> ><body> > ><p> >It can be helpful to monitor your 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> > ><table> ><tr> > <th>Warning Levels from highest to lowest</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 on say a desktop, users can use a >xterm and execute the following command. ></p> > ><pre caption="Using a Xterm to monitor the Apache log"> ># <i>tail -f /var/log/apache2/error_log</i> ></pre> > ></body> ></section> ><section> ><title>Summary</title> ><body> > ><p> >Congratulations to the user for a painless quick start on Apache. ></p> > ><p> >Users are encouraged to check back on this guide for more updates concerning >Apache user and configuration. Possible future content include a FAQ. ></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