home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2004 March / PCWMAR04.iso / Software / Resources / Apache / apache_2.0.48-win32-x86-no_ssl.exe / F253957_ssi.xml.ja < prev    next >
Encoding:
Text File  |  2003-04-15  |  19.4 KB  |  427 lines

  1. sg</code> $BB0@-$GJQ99$9$k$3$H$,$G$-$^$9(B:</p>
  2. <div class="example"><p><code>
  3.         <!--#config errmsg="[It appears that you don't know how to use SSI]" -->
  4. </code></p></div>
  5.  
  6.     <p>$B$*$=$i$/!"%(%s%I%f!<%6$O$3$N%a%C%;!<%8$r7h$7$F8+$k$3$H$O$"$j$^$;$s!#(B
  7.     $B$J$<$J$i!"$=$N%5%$%H$,@8$-$?>uBV$K$J$kA0$K(B SSI $B%G%#%l%/%F%#%V$K4X$9$k(B
  8.     $BA4$F$NLdBj$r2r7h$7$F$$$k$O$:$@$+$i$G$9!#(B($B$=$&$G$9$h$M(B?)</p>
  9.  
  10.     <p>$B$=$7$F!"(B<code>config</code> $B$K$*$$$F(B <code>sizefmt</code>
  11.     $BB0@-$r;HMQ$9$k$3$H$G!"(B
  12.     $BJV$5$l$k%U%!%$%k%5%$%:$N=q<0$r@_Dj$9$k$3$H$,$G$-$^$9!#(B
  13.     $B%P%$%H?t$K$O(B <code>bytes</code> $B$r!"E,Ev$K(B Kb $B$d(B Mb
  14.     $B$KC;=L$5$;$k$K$O(B <code>abbrev</code> $B$r;XDj$9$k$3$H$,$G$-$^$9!#(B</p>
  15.     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  16. <div class="section">
  17. <h2><a name="exec" id="exec">$B%3%^%s%I$N<B9T(B</a></h2>
  18.     
  19.  
  20.     <p>$B:#8e?t%v7n$N$&$A$K!">.$5$J(B CGI $B%W%m%0%i%`$H(B SSI
  21.     $B$r;HMQ$9$k5-;v$r=P$7$?$$$H9M$($F$$$^$9!#$3$3$G$O$=$l$H$OJL$K!"(B
  22.     <code>exec</code> $BMWAG$K$h$C$F9T$J$&$3$H$,$G$-$k$3$H$r<($7$^$9!#(B
  23.     SSI $B$K%7%'%k(B ($B@53N$K$O(B <code>/bin/sh</code>$B!#(BWin32 $B$J$i$P(B DOS $B%7%'%k(B)
  24.     $B$r;HMQ$7$F%3%^%s%I$r<B9T$5$;$k$3$H$,$G$-$^$9!#(B
  25.     $B2<5-$N(B$BNc$G$O!"%G%#%l%/%H%j%j%9%H=PNO$r9T$J$$$^$9!#(B</p>
  26. <div class="example"><p><code>
  27.         <pre><br />
  28.         <!--#exec cmd="ls" --><br />
  29.         </pre>
  30. </code></p></div>
  31.  
  32.     <p>Windows $B>e$G$O!"(B</p>
  33. <div class="example"><p><code>
  34.         <pre><br />
  35.         <!--#exec cmd="dir" --><br />
  36.         </pre>
  37. </code></p></div>
  38.  
  39.     <p>Windows $B>e$G$O!"$3$N%G%#%l%/%F%#%V$K$h$C$F$$$/$D$+$N4qL/$J(B
  40.     $B=q<0$K5$$E$/$G$7$g$&!#$J$<$J$i(B <code>dir</code> $B$N=PNO$,J8;zNs(B
  41.     ``<<code>dir</code>>'' $B$r4^$_!"%V%i%&%6$r:.Mp$5$;$k$+$i$G$9!#(B</p>
  42.  
  43.     <p>$B$3$N5!G=$OHs>o$K4m81$G$"$j!"$I$s$J%3!<%I$G$b(B <code>exec</code>
  44.     $B%?%0$KKd$a9~$^$l$F$7$^$($P<B9T$9$k$3$H$KCm0U$7$F$/$@$5$$!#Nc$($P(B 
  45.     `` $B%2%9%H%V%C%/(B '' $B$N$h$&$K!"$b$7!"(B
  46.     $B%f!<%6$,%Z!<%8$NFbMF$rJT=8$G$-$k>u67$K$"$k$J$i$P!"(B
  47.     $B$3$N5!G=$r3N<B$KM^@)$7$F$/$@$5$$!#(B<code>Options</code>
  48.     $B%G%#%l%/%F%#%V$N(B <code>IncludesNOEXEC</code> $B0z?t$r;XDj$9$k$3$H$G!"(B
  49.     SSI $B$O5v2D$9$k$1$l$I(B <code>exec</code>
  50.     $B5!G=$O5v2D$7$J$$$h$&$K$9$k$3$H$,$G$-$^$9!#(B</p>
  51.     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  52. <div class="section">
  53. <h2><a name="advanced" id="advanced">$B9bEY$J(B SSI $B%F%/%K%C%/(B</a></h2>
  54.  
  55.  
  56.     <p>$B%3%s%F%s%D$r=PNO$9$k$3$H$K2C$(!"(BApache SSI $B$OJQ?t$r@_Dj$7!"(B
  57.     $B$=$7$FHf3S$H>r7oJ,4t$K$=$NJQ?t$r;HMQ$G$-$k5!G=$rDs6!$7$F$$$^$9!#(B
  58.     </p>
  59.  
  60. <h3><a name="caveat" id="caveat">$B7Y9p(B</a></h3>
  61.  
  62.     <p>$B$3$N5-;v$G=R$Y$?BgItJ,$N5!G=$O!"(BApache 1.2
  63.     $B0J9_$r;HMQ$7$F$$$k>l9g$N$_MxMQ2DG=$G$9!#$b$A$m$s!"$b$7(B Apache 1.2
  64.     $B0J9_$r;HMQ$7$F$J$$>l9g!"D>$A$K%"%C%W%0%l!<%I$9$kI,MW$,$"$j$^$9!#(B
  65.     $B$5$!!":#$=$l$r9T$J$$$J$5$$!#$=$l$^$GBT$C$F$$$^$9!#(B</p>
  66.  
  67.  
  68. <h3><a name="variables" id="variables">$BJQ?t$r@_Dj$9$k(B</a></h3>
  69.  
  70.     <p><code>set</code> $B%G%#%l%/%F%#%V$r;HMQ$7$F!"(B
  71.     $B8e$G;HMQ$9$k$?$a$KJQ?t$r@_Dj$9$k$3$H$,$G$-$^$9!#(B
  72.     $B$3$l$O8e$N@bL@$GI,MW$K$J$k$N$G!"$3$3$G$=$l$K$D$$$F=R$Y$F$$$^$9!#(B
  73.     $BJ8K!$O0J2<$N$H$*$j$G$9(B:</p>
  74. <div class="example"><p><code>
  75.         <!--#set var="name" value="Rich" -->
  76. </code></p></div>
  77.  
  78.     <p>$B$3$N$h$&$KC1=c$KJ8;z$I$*$j$K@_Dj$9$k$3$H$K2C$(!"(B
  79.     $BNc$($P4D6-JQ?t$dA0$N5-;v$G=R$Y$?JQ?t(B
  80.     ($BNc$($P(B <code>LAST_MODIFIED</code> $B$N$h$&$J(B)
  81.     $B$r4^$`B>$N$"$i$f$kJQ(B$B?t$rCM$r@_Dj$9$k$N$K;HMQ$9$k$3$H$,$G$-$^$9!#(B
  82.     $BJQ?tL>$NA0$K%I%k5-9f(B ($) $B$r;HMQ$9$k$3$H$G!"(B
  83.     $B$=$l$,%j%F%i%kJ8;zNs$G$O$J$/$FJQ?t$G$"$k$3$H$r<($7$^$9!#(B</p>
  84. <div class="example"><p><code>
  85.         <!--#set var="modified" value="$LAST_MODIFIED" -->
  86. </code></p></div>
  87.  
  88.     <p>$B%I%k5-9f(B ($) $B$rJ8;z$H$7$FJQ?t$NCM$KF~$l$k$K$O!"(B
  89.     $B%P%C%/%9%i%C%7%e$K$h$C$F%I%k5-9f$r%(%9%1!<%W$9$kI,MW$,$"$j$^$9!#(B</p>
  90. <div class="example"><p><code>
  91.         <!--#set var="cost" value="\$100" -->
  92. </code></p></div>
  93.  
  94.     <p>$B:G8e$K$J$j$^$9$,!"D9$$J8;zNs$NCf$KJQ?t$rCV$-$?$$>l9g$G!"(B
  95.     $BJQ?tL>$,B>$NJ8;z$H$V$D$+$k2DG=@-$,$"$j!"(B
  96.     $B$=$l$i$NJ8;z$K$D$$$F:.Mp$7$F$7$^$&>l9g!"$3$N:.Mp$r<h$j=|$/$?$a!"(B
  97.     $BJQ?tL>$rCf3g8L$G0O$`$3$H$,$G$-$^$9(B
  98.     ($B$3$l$K$D$$$F$NNI$$Nc$r<($9$N$OFq$7$$$N$G$9$,!"(B
  99.     $B$*$=$i$/J,$+$C$F$$$?$@$1$k$G$7$g$&(B)$B!#(B
  100.     </p>
  101. <div class="example"><p><code>
  102.         <!--#set var="date" value="${DATE_LOCAL}_${DATE_GMT}" -->
  103. </code></p></div>
  104.  
  105.  
  106. <h3><a name="conditional" id="conditional">$B>r7o<0(B</a></h3>
  107.  
  108.  
  109.     <p>$B$5$F!"JQ?t$r;}$C$F$$$F!"(B
  110.     $B$=$l$i$NCM$r@_Dj$7$FHf3S$9$k$3$H$,$G$-$k$N$G$9$+$i!"(B
  111.     $B>r7o$rI=$9$?$a$K$=$l$i$r;HMQ$9$k$3$H$,$G$-$^$9!#$3$l$K$h$j(B
  112.     SSI $B$O$"$k<o$N>.$5$J%W%m%0%i%_%s%08@8l$K$J$C$F$$$^$9!#(B
  113.     <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> $B$O>r7o$rI=8=$9$k$?$a$K(B <code>if</code>,
  114.     <code>elif</code>, <code>else</code>, <code>endif</code>
  115.     $B9=B$$rDs6!$7$F$$$^$9!#$3$l$K$h$C$F!"(B
  116.     $B0l$D$N<B:]$N%Z!<%8$+$iJ#?t$NO@M}%Z!<%8$r8z2LE*$K@8@.$9$k$3$H$,$G$-$^$9!#(B</p>
  117.  
  118.     <p>$B>r7o9=B$$O0J2<$N$H$*$j$G$9(B:</p>
  119. <div class="example"><p><code>
  120.     <!--#if expr="test_condition" --><br />
  121.     <!--#elif expr="test_condition" --><br />
  122.     <!--#else --><br />
  123.     <!--#endif -->
  124. </code></p></div>
  125.  
  126.     <p><em>test_condition</em>
  127.     $B$O$"$i$f$k<oN`$NO@M}E*Hf3S$r$9$k$3$H$,$G$-$^$9!#(B
  128.     $BCM$rHf3S$7$?$j!"$=$NCM$,(B ``$B??(B'' $B$+$I$&$+$rI>2A$7$^$9(B
  129.     ($B6u$G$J$$$J$iM?$($i$l$?J8;zNs$O??$G$9(B)$B!#(B
  130.     $BMxMQ2DG=$JHf3S1i;;;R$NA4$F$N%j%9%H$K$D$$$F$O!"(B
  131.     <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> $B%I%-%e%a%s%F!<%7%g%s$r;2>H$7$F$/$@$5$$!#(B
  132.     $B$3$3$G$O!"$3$N9=B$$r$I$&;HMQ$9$k$+$NNc$r$$$/$D$+<($7$^$9!#(B</p>
  133.  
  134.     <p>$B@_Dj%U%!%$%k$G<!$N9T$r5-=R$7$^$9(B:</p>
  135. <div class="example"><p><code>
  136.         BrowserMatchNoCase macintosh Mac<br />
  137.         BrowserMatchNoCase MSIE InternetExplorer
  138. </code></p></div>
  139.  
  140.     <p>$B$3$l$O%/%i%$%"%s%H$,(B Macintosh
  141.     $B>e$G%$%s%?!<%M%C%H%(%/%9%W%m!<%i$,F0$$$F$$$k>l9g!"4D6-JQ?t(B
  142.     ``Mac'' $B$H(B ``InternetExplorer'' $B$r??$H@_Dj$7$^$9!#(B</p>
  143.  
  144.     <p>$B<!$K!"(BSSI $B$,2DG=$K$J$C$?%I%-%e%a%s%H$G0J2<$r9T$J$$$^$9(B:
  145.     </p>
  146. <div class="example"><p><code>
  147.         <!--#if expr="${Mac} && ${InternetExplorer}" --><br />
  148.         Apologetic text goes here<br />
  149.         <!--#else --><br />
  150.         Cool JavaScript code goes here<br />
  151.         <!--#endif -->
  152. </code></p></div>
  153.  
  154.     <p>Mac $B>e$N(B IE $B$KBP$7$F2?$+;W$&$H$3$m$,$"$k$o$1$G$"$j$^$;$s!#(B
  155.     $BB>$G$O<B9T$G$-$F$$$k$$$/$D$+$N(B JavaScript $B$r(B Mac $B>e$N(B IE
  156.     $B$G<B9T$5$;$k$N$K!"@h=5?t;~4V6lO+$7$?$H$$$&$@$1$N$3$H$G$9!#(B
  157.     $B>e$NNc$O$=$N;CDjE*$JBP=hJ}K!$G$9!#(B</p>
  158.  
  159.     <p>$BB>$N$I$s$JJQ?t(B ($B$"$J$?$,Dj5A$9$k$b$N!"(B
  160.     $B$^$?$OIaDL$N4D6-JQ?t$N$$$:$l$+(B) $B$b!">r7oJ8$K;HMQ$9$k$3$H$,$G$-$^$9!#(B
  161.     Apache $B$O(B <code>SetEnvIf</code> $B%G%#%l%/%F%#%V$dB>$N4XO"(B
  162.     $B%G%#%l%/%F%#%V$r;HMQ$7$F4D6-JQ?t$r@_Dj$9$k$3$H$,$G$-$^$9!#(B
  163.     $B$3$N5!G=$K$h$j!"(BCGI
  164.     $B$KMj$k$3$H$J$/$+$J$jJ#;($JF0E*$J$3$H$r$5$;$k$3$H$,$G$-$^$9!#(B</p>
  165.  
  166. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  167. <div class="section">
  168. <h2><a name="conclusion" id="conclusion">$B=*$o$j$K(B</a></h2>
  169.  
  170.     <p>SSI $B$O3N$+$K(B CGI
  171.     $B$dF0E*$J%&%'%V%Z!<%8$r@8@.$9$kB>$N5;=Q$KBe$o$k$b$N$G$O$"$j$^$;$s!#(B
  172.     $B$7$+$7!"$?$/$5$s$NM>J,$J:n6H$r$;$:$K!"(B
  173.     $B>/NL$NF0E*$J%3%s%F%s%D$r2C$($k$K$O$9$0$l$?J}K!$G$9!#(B</p>
  174. </div></div>
  175. <div class="bottomlang">
  176. <p><span>Available Languages: </span><a href="../en/howto/ssi.html" hreflang="en" rel="alternate" title="English"> en </a> |
  177. <a href="../ja/howto/ssi.html" title="Japanese"> ja </a></p>
  178. </div><div id="footer">
  179. <p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
  180. <p class="menu"><a href="../mod/">$B%b%8%e!<%k(B</a> | <a href="../mod/directives.html">$B%G%#%l%/%F%#%V(B</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">$BMQ8l(B</a> | <a href="../sitemap.html">$B%5%$%H%^%C%W(B</a></p></div>
  181. </body></html><?xml version='1.0' encoding='UTF-8' ?>
  182. <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
  183. <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
  184.  
  185. <manualpage metafile="auth.xml.meta">
  186. <parentdocument href="./">How-To / Tutorials</parentdocument>
  187.  
  188. <title>Authentication, Authorization and Access Control</title>
  189.  
  190. <summary>
  191.     <p>Authentication is any process by which you verify that
  192.     someone is who they claim they are. Authorization is any
  193.     process by which someone is allowed to be where they want to
  194.     go, or to have information that they want to have.</p>
  195. </summary>
  196.   
  197. <section id="related"><title>Related Modules and Directives</title>
  198.     <related>
  199.       <modulelist>
  200.         <module>mod_auth</module>
  201.         <module>mod_access</module>
  202.       </modulelist>
  203.  
  204.       <directivelist>
  205.         <directive module="mod_access">Allow</directive>
  206.         <directive module="mod_auth">AuthGroupFile</directive>
  207.         <directive module="core">AuthName</directive>
  208.         <directive module="core">AuthType</directive>
  209.         <directive module="mod_auth">AuthUserFile</directive>
  210.         <directive module="mod_access">Deny</directive>
  211.         <directive module="core">Options</directive>
  212.         <directive module="core">Require</directive>
  213.       </directivelist>
  214.     </related>
  215. </section>
  216.  
  217. <section id="introduction"><title>Introduction</title>
  218.     <p>If you have information on your web site that is sensitive
  219.     or intended for only a small group of people, the techniques in
  220.     this article will help you make sure that the people that see
  221.     those pages are the people that you wanted to see them.</p>
  222.  
  223.     <p>This article covers the "standard" way of protecting parts
  224.     of your web site that most of you are going to use.</p>
  225. </section>
  226.  
  227. <section id="theprerequisites"><title>The Prerequisites</title>
  228.     <p>The directives discussed in this article will need to go
  229.     either in your main server configuration file (typically in a
  230.     <directive module="core" type="section">Directory</directive> section), or
  231.     in per-directory configuration files (<code>.htaccess</code> files).</p>
  232.  
  233.     <p>If you plan to use <code>.htaccess</code> files, you will
  234.     need to have a server configuration that permits putting
  235.     authentication directives in these files. This is done with the
  236.     <directive module="core">AllowOverride</directive> directive, which
  237.     specifies which directives, if any, may be put in per-directory
  238.     configuration files.</p>
  239.  
  240.     <p>Since we're talking here about authentication, you will need
  241.     an <directive module="core">AllowOverride</directive> directive like the
  242.     following:</p>
  243.  
  244.     <example>
  245.       AllowOverride AuthConfig
  246.     </example>
  247.  
  248.     <p>Or, if you are just going to put the directives directly in
  249.     your main server configuration file, you will of course need to
  250.     have write permission to that file.</p>
  251.  
  252.     <p>And you'll need to know a little bit about the directory
  253.     structure of your server, in order to know where some files are
  254.     kept. This should not be terribly difficult, and I'll try to
  255.     make this clear when we come to that point.</p>
  256. </section>
  257.  
  258. <section id="gettingitworking"><title>Getting it working</title>
  259.     <p>Here's the basics of password protecting a directory on your
  260.     server.</p>
  261.  
  262.     <p>You'll need to create a password file. This file should be
  263.     placed somewhere not accessible from the web. This is so that
  264.     folks cannot download the password file. For example, if your
  265.     documents are served out of <code>/usr/local/apache/htdocs</code> you
  266.     might want to put the password file(s) in
  267.     <code>/usr/local/apache/passwd</code>.</p>
  268.  
  269.     <p>To create the file, use the <a
  270.     href="../programs/htpasswd.html">htpasswd</a> utility that came
  271.     with Apache. This be located in the <code>bin</code> directory
  272.     of wherever you installed Apache. To create the file, type:</p>
  273.  
  274.     <example>
  275.       htpasswd -c /usr/local/apache/passwd/passwords rbowen
  276.     </example>
  277.  
  278.     <p><code>htpasswd</code> will ask you for the password, and
  279.     then ask you to type it again to confirm it:</p>
  280.  
  281.     <example>
  282.       # htpasswd -c /usr/local/apache/passwd/passwords rbowen<br />
  283.       New password: mypassword<br />
  284.       Re-type new password: mypassword<br />
  285.       Adding password for user rbowen
  286.     </example>
  287.  
  288.     <p>If <code>htpasswd</code> is not in your path, of course
  289.     you'll have to type the full path to the file to get it to run.
  290.     On my server, it's located at
  291.     <code>/usr/local/apache/bin/htpasswd</code></p>
  292.  
  293.     <p>Next, you'll need to configure the server to request a
  294.     password and tell the server which users are allowed access.
  295.     You can do this either by editing the <code>httpd.conf</code>
  296.     file or using an <code>.htaccess</code> file. For example, if
  297.     you wish to protect the directory
  298.     <code>/usr/local/apache/htdocs/secret</code>, you can use the
  299.     following directives, either placed in the file
  300.     <code>/usr/local/apache/htdocs/secret/.htaccess</code>, or
  301.     placed in <code>httpd.conf</code> inside a <Directory
  302.     /usr/local/apache/apache/htdocs/secret> section.</p>
  303.  
  304.     <example>
  305.       AuthType Basic<br />
  306.       AuthName "Restricted Files"<br />
  307.       AuthUserFile /usr/local/apache/passwd/passwords<br />
  308.       Require user rbowen
  309.     </example>
  310.  
  311.     <p>Let's examine each of those directives individually. The <directive
  312.     module="core">AuthType</directive> directive selects
  313.     that method that is used to authenticate the user. The most
  314.     common method is <code>Basic</code>, and this is the method
  315.     implemented by <module>mod_auth</module>. It is important to be aware,
  316.     however, that Basic authentication sends the password from the client to
  317.     the browser unencrypted. This method should therefore not be used for
  318.     highly sensitive data. Apache supports one other authentication method:
  319.     <code>AuthType Digest</code>. This method is implemented by <module
  320.     >mod_auth_digest</module> and is much more secure. Only the most recent
  321.     versions of clients are known to support Digest authentication.</p>
  322.  
  323.     <p>The <directive module="core">AuthName</directive> directive sets
  324.     the <dfn>Realm</dfn> to be used in the authentication. The realm serves
  325.     two major functions. First, the client often presents this information to
  326.     the user as part of the password dialog box. Second, it is used by the
  327.     client to determine what password to send for a given authenticated
  328.     area.</p>
  329.  
  330.     <p>So, for example, once a client has authenticated in the
  331.     <code>"Restricted Files"</code> area, it will automatically
  332.     retry the same password for any area on the same server that is
  333.     marked with the <code>"Restricted Files"</code> Realm.
  334.     Therefore, you can prevent a user from being prompted more than
  335.     once for a password by letting multiple restricted areas share
  336.     the same realm. Of course, for security reasons, the client
  337.     will always need to ask again for the password whenever the
  338.     hostname of the server changes.</p>
  339.  
  340.     <p>The <directive module="mod_auth">AuthUserFile</directive>
  341.     directive sets the path to the password file that we just
  342.     created with <code>htpasswd</code>. If you have a large number
  343.     of users, it can be quite slow to search through a plain text
  344.     file to authenticate the user on each request. Apache also has
  345.     the ability to store user information in fast database files.
  346.     The <module>mod_auth_dbm</module> module provides the <directive
  347.     module="mod_auth_dbm">AuthDBMUserFile</directive> directive. These
  348.     files can be created and manipulated with the <a
  349.     href="../programs/dbmmanage.html">dbmmanage</a> program. Many
  350.     other types of authentication options are available from third
  351.     party modules in the <a
  352.     href="http://modules.apache.org/">Apache Modules
  353.     Database</a>.</p>
  354.  
  355.     <p>Finally, the <directive module="core">Require</directive>
  356.     directive provides the authorization part of the process by
  357.     setting the user that is allowed to access this region of the
  358.     server. In the next section, we discuss various ways to use the
  359.     <directive module="core">Require</directive> directive.</p>
  360. </section>
  361.  
  362. <section id="lettingmorethanonepersonin"><title>Letting more than one
  363. person in</title>
  364.     <p>The directives above only let one person (specifically
  365.     someone with a username of <code>rbowen</code>) into the
  366.     directory. In most cases, you'll want to let more than one
  367.     person in. This is where the <directive module="mod_auth"
  368.     >AuthGroupFile</directive> comes in.</p>
  369.  
  370.     <p>If you want to let more than one person in, you'll need to
  371.     create a group file that associates group names with a list of
  372.     users in that group. The format of this file is pretty simple,
  373.     and you can create it with your favorite editor. The contents
  374.     of the file will look like this:</p>
  375.  
  376.    <example>
  377.      GroupName: rbowen dpitts sungo rshersey
  378.    </example>
  379.  
  380.     <p>That's just a list of the members of the group in a long
  381.     line separated by spaces.</p>
  382.  
  383.     <p>To add a user to your already existing password file,
  384.     type:</p>
  385.  
  386.     <example>
  387.       htpasswd /usr/local/apache/passwd/password dpitts
  388.     </example>
  389.  
  390.     <p>You'll get the same response as before, but it will be
  391.     appended to the existing file, rather than creating a new file.
  392.     (It's the <code>-c</code> that makes it create a new password
  393.     file).</p>
  394.  
  395.     <p>Now, you need to modify your <code>.htaccess</code> file to
  396.     look like the following:</p>
  397.  
  398.     <example>
  399.       AuthType Basic<br />
  400.       AuthName "By Invitation Only"<br />
  401.       AuthUserFile /usr/local/apache/passwd/passwords<br />
  402.       AuthGroupFile /usr/local/apache/passwd/groups<br />
  403.       Require group GroupName
  404.     </example>
  405.  
  406.     <p>Now, anyone that is listed in the group <code>GroupName</code>,
  407.     and has an entry in the <code>password</code> file, will be let in, if
  408.     they type the correct password.</p>
  409.  
  410.     <p>There's another way to let multiple users in that is less
  411.     specific. Rather than creating a group file, you can just use
  412.     the following directive:</p>
  413.  
  414.     <example>
  415.       Require valid-user
  416.     </example>
  417.  
  418.     <p>Using that rather than the <code>Require user rbowen</code>
  419.     line will allow anyone in that is listed in the password file,
  420.     and who correctly enters their password. You can even emulate
  421.     the group behavior here, by just keeping a separate password
  422.     file for each group. The advantage of this approach is that
  423.     Apache only has to check one file, rather than two. The
  424.     disadvantage is that you have to maintain a bunch of password
  425.     files, and remember to reference the right one in the
  426.     <directive module="mod_auth">AuthUserFile</directive> directive.</p>
  427. </