📄 asg10.htm
字号:
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>The </B><B>mod_auth_db</B><B> Module</B></FONT></CENTER></H3>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Source:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
mod_auth_db.c</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Base:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
No</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Type:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Security/Access Control</FONT>
</TABLE><P>The mod_auth_dbm module is not built into Apache by default. In order to use any of its directives, you need to reconfigure Apache to include this module and recompile the server. This module provides user authentication using Berkeley DB (BSD) files. It is very similar to mod_auth_dbm and should be used as an alternative to mod_auth_dbm on those systems that support DB and not DBM.
<BR>
<BR>
<A NAME="E69E94"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>mod_auth_db</B><B> Directives</B></FONT></CENTER></H4>
<BR>
<P>mod_auth_db provides you with the AuthDBGroupFile and AuthDBUserFile directives that you can use to specify the location of your password and group files. Password and group files are maintained with the dbmmanage program included in your server's support directory. For more information on how to use the dbmmanage program, see <A HREF="asg15.htm" tppabs="http://docs.rinet.ru:8080/Apachu/asg15.htm">Chapter 15</A>.
<BR>
<BR>
<A NAME="E70E61"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>AuthDBGroupFile</B></FONT></CENTER></H5>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Syntax:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
AuthDBroupFile <I>dbfilename</I></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Context:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
directory, location, .htaccess</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Override:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
AllowOverride AuthConfig</FONT>
</TABLE><P>The AuthDBGroupFile directive allows you to specify the location of the user/password/group file. <I>dbfilename</I> should be an absolute path outside of DocumentRoot. For security reasons, it is important that <I>filename</I> is outside of the directory it is trying to protect:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">AuthDBGroupFile /usr/local/etc/httpd/passwords/passworddb</FONT></PRE>
<P>DB password files store username, password, and group information. Typically you'll reference <I>dbfilename</I> on both the AuthDBGroupFile and AuthDBUserFile directives. User information in the group file is maintained using the dbmmanage program included in the server's support directory. You'll need a copy of Perl to run dbmmanage. For information on how to use the dbmmanage program, see <A HREF="asg15.htm" tppabs="http://docs.rinet.ru:8080/Apachu/asg15.htm">Chapter 15</A>.
<BR>
<BR>
<A NAME="E70E62"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>AuthDBUserFile</B></FONT></CENTER></H5>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Syntax:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
AuthDBUserFile <I>dbfilename</I></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Context:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
directory, location, .htaccess</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Override:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
AllowOverride AuthConfig</FONT>
</TABLE><P>The AuthDBUserFile directive allows you to specify the location of the user/password/group file. <I>dbfilename</I> should be an absolute path outside of DocumentRoot. For security reasons, it is important that <I>filename</I> is outside of the directory it is trying to protect:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">AuthDBUserFile /usr/local/etc/httpd/passwords/passworddb</FONT></PRE>
<P>DBM password files store username, password, and group information. Typically you'll reference <I>dbfilename</I> on both AuthDBGroupFile and AuthDBUserFile directives. User information in the group file is maintained using the dbmmanage program included in the server's support directory. You'll need a copy of Perl to run dbmmanage. For information on how to use the dbmmanage program, see <A HREF="asg15.htm" tppabs="http://docs.rinet.ru:8080/Apachu/asg15.htm">Chapter 15</A>.
<BR>
<BR>
<A NAME="E68E116"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>The </B><B>mod_auth_dbm</B><B> Module</B></FONT></CENTER></H3>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Source:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
mod_auth_dbm.c</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Base:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
No</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Type:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Security/Access Control</FONT>
</TABLE><P>The mod_auth_dbm module is not built into Apache by default. In order to use any of its directives, you need to reconfigure Apache to include this module and recompile the server.
<BR>
<P>This module provides user authentication using DBM files. <I>User </I><I>authentication</I> allows you to control access to a document tree on an individual user basis, using user and password lists to provide the necessary authentication verification. When a user requests a restricted resource, the server requires him to log in by specifying a username and a password. If the user supplies the proper information, access is granted to roam across the site without additional login requests.
<BR>
<P>DBM files provide a significant performance improvement over the authentication routines provided by mod_auth. If your password file has more than 100 entries, you should use the mod_auth_dbm module and its directives instead.
<BR>
<BR>
<A NAME="E69E95"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>mod_auth_dbm</B><B> Directives</B></FONT></CENTER></H4>
<BR>
<P>mod_auth_dbm provides you with the AuthDBMGroupFile and AuthDBMUserFile directives that you can use to specify the location of your password and group files. Password and group files are maintained with the dbmmanage program included in your server's support directory. For more information on how to use the dbmmanage program, see <A HREF="asg15.htm" tppabs="http://docs.rinet.ru:8080/Apachu/asg15.htm">Chapter 15</A>.
<BR>
<BR>
<A NAME="E70E63"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>AuthDBMGroupFile</B></FONT></CENTER></H5>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Syntax:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
AuthDBMGroupFile <I>dbmfilename</I></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Context:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
directory, location, .htaccess</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Override:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
AllowOverride AuthConfig</FONT>
</TABLE><P>The AuthDBMGroupFile directive allows you to specify the location of the user/password/group file. <I>dbmfilename</I> should be an absolute path outside of DocumentRoot. For security reasons, it is important that <I>filename</I> is outside of the directory it is trying to protect:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">AuthDBMGroupFile /usr/local/etc/httpd/passwords/passworddbm</FONT></PRE>
<P>DBM password files store username, password, and group information. Typically you'll reference <I>dbmfilename</I> on both the AuthDBMGroupFile and AuthDBMUserFile directives. User information in the group file is maintained using the dbmmanage program included in the server's support directory. You'll need a copy of Perl to run dbmmanage. For information on how to use the dbmmanage program, see <A HREF="asg15.htm" tppabs="http://docs.rinet.ru:8080/Apachu/asg15.htm">Chapter 15</A>.
<BR>
<BR>
<A NAME="E70E64"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B> </B><A NAME="I10"></A><A NAME="I11"></A><A NAME="I12"></A><A NAME="I13"></A><A NAME="I14"></A><A NAME="I15"></A><A NAME="I16"></A><A NAME="I17"></A><A NAME="I18"></A><A NAME="I19"></A><A NAME="I20"></A><A NAME="I21"></A><A NAME="I22"></A><A NAME="I23"></A><A NAME="I24"></A><A NAME="I25"></A><A NAME="I26"></A><A NAME="I27"></A><A NAME="I28"></A><A NAME="I29"></A><A NAME="I30"></A><A NAME="I31"></A><A NAME="I32"></A><A NAME="I33"></A><B>AuthDBMUserFile</B></FONT></CENTER></H5>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Syntax:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
AuthDBMUserFile <I>dbmfilename</I></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Context:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
directory, location, .htaccess</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Override:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
AllowOverride AuthConfig</FONT>
</TABLE><P>The AuthDBMUserFile directive allows you to specify the location of the user/password/group file. <I>dbmfilename</I> should be an absolute path outside of DocumentRoot. For security reasons, it is important that <I>filename</I> is outside of the directory it is trying to protect:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">AuthDBMUserFile /usr/local/etc/httpd/passwords/passworddbm</FONT></PRE>
<P>DBM password files store username, password, and group information. Typically you'll reference <I>dbmfilename</I> on both AuthDBMGroupFile and AuthDBMUserFile directives. User information in the group file is maintained using the dbmmanage program included in the server's support directory. You'll need a copy of Perl to run dbmmanage. For information on how to use the dbmmanage program, please see <A HREF="asg15.htm" tppabs="http://docs.rinet.ru:8080/Apachu/asg15.htm">Chapter 15</A>.
<BR>
<BR>
<A NAME="E68E117"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>The </B><B>mod_auth_msql</B><B> Module</B></FONT></CENTER></H3>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Source:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
mod_auth_msql.c</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Base:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
No</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Type:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Security/Access Control</FONT>
</TABLE><P>The mod_auth_msql module is not built into Apache by default. In order to use any of its directives, you need to reconfigure Apache to include this module and recompile the server.
<BR>
<P>mod_auth_msql allows you to provide access control using the mini SQL (mSQL) relational database engine, which can be obtained from <A HREF="javascript:if(confirm('ftp://ftp.bond.edu.au/pub/Minerva/msql \n\nThis file was not retrieved by Teleport Pro, because it did not meet the project\'s file type specifications. \n\nDo you want to open it from the server?'))window.location='ftp://ftp.bond.edu.au/pub/Minerva/msql'" tppabs="ftp://ftp.bond.edu.au/pub/Minerva/msql"> ftp://ftp.bond.edu.au/pub/Minerva/msql</A>. mSQL is not free for commercial or private use. Price for the engine is U.S. $170 for commercial organizations and $50 for private use. For more information, please visit the mSQL FTP site. On-line documentation for the server can be found at <A HREF="javascript:if(confirm('http://huges.com.au/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://huges.com.au/'" tppabs="http://huges.com.au/"> http://Huges.com.au</A> and <A HREF="javascript:if(confirm('http://cscsun1.larc.nasa.gov/~beowulf/msql/msql.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://cscsun1.larc.nasa.gov/~beowulf/msql/msql.html'" tppabs="http://cscsun1.larc.nasa.gov/~beowulf/msql/msql.html"> http://cscsun1.larc.nasa.gov/~beowulf/msql/msql.html</A>.
<BR>
<BR>
<A NAME="E69E96"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>mod_auth_msql</B><B> Directives</B></FONT></CENTER></H4>
<BR>
<P>mod_auth_msql provides you with several directives that allow you to map the various authentication pieces of information to tables and fields within a mSQL database.
<BR>
<UL>
<LI>Auth_MSQLhost
<BR>
<BR>
<LI>Auth_MSQLdatabase
<BR>
<BR>
<LI>Auth_MSQLpwd_table
<BR>
<BR>
<LI>Auth_MSQLgrp_table
<BR>
<BR>
<LI>Auth_MSQLuid_field
<BR>
<BR>
<LI>Auth_MSQLpwd_field
<BR>
<BR>
<LI>Auth_MSQLgrp_field
<BR>
<BR>
<LI>Auth_MSQL_nopasswd
<BR>
<BR>
<LI>Auth_MSQL_Authorative
<BR>
<BR>
<LI>Auth_MSQL_EncryptedPasswords
<BR>
<BR>
</UL>
<BR>
<A NAME="E70E65"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Auth_MSQLhost</B></FONT></CENTER></H5>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Syntax:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Auth_MSQLhost [<I>FQDN</I>] | [<I>IPaddress</I>] | [localhost]</FONT>
</TABLE><P>The Auth_MSQLhost directive sets the address of the host that is running the mSQL server. The host's address can be specified as the fully qualified domain name (<I>FQDN</I>), by IP address (<I>IPaddress</I>), or by specifying localhost, when the Web server host is also the database server. The localhost option forces the use of the faster interface /dev/msql instead of a slower socket connection.
<BR>
<BR>
<A NAME="E70E66"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Auth_MSQLdatabase</B></FONT></CENTER></H5>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Syntax:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Auth_MSQLdatabase <I>databasename</I></FONT>
</TABLE><P>The Auth_MSQLdatabase directive sets the name of the mSQL database that contains the various authentication tables.
<BR>
<BR>
<A NAME="E70E67"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Auth_MSQLpwd_table</B></FONT></CENTER></H5>
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="80%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Syntax:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Auth_MSQLpwd_table <I>passwd-table</I></FONT>
</TABLE><P>The Auth_MSQLpwd_table directive sets the name of the table that contains the fields defined by Auth_MSQLuid_field and Auth_MSQLpwd_field.
<BR>
<BR>
<A NAME="E70E68"></A>
<H5 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Auth_MSQLgrp_table</B></FONT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -