From: Nick Kew Date: Sat, 29 Oct 2005 11:25:06 +0000 (+0000) Subject: Add a usage example to documentation page X-Git-Tag: 2.3.0~2818 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5af8acb5dde176793bf111a62411a48a43fc5c4;p=thirdparty%2Fapache%2Fhttpd.git Add a usage example to documentation page git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@329397 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_authn_dbd.html.en b/docs/manual/mod/mod_authn_dbd.html.en index f1425cc7dd0..5754780ce2a 100644 --- a/docs/manual/mod/mod_authn_dbd.html.en +++ b/docs/manual/mod/mod_authn_dbd.html.en @@ -1,21 +1,21 @@ - mod_authn_dbd - Apache HTTP Server - - - - + + + + -
<-
+ +
<-
Apache > HTTP Server > Documentation > Version 2.1 > Modules
@@ -47,10 +47,13 @@

Directives

-

See also

+

Topics

+

See also

+
top
+
+

Configuration Example

-
top
-

AuthDBDUserPWQuery Directive

+

This simple example shows use of this module in the context of +the Authentication and DBD frameworks.

+
+#Database Management
+
+#Use the PostgreSQL driver
+DBDriver pgsql
+
+#Connection string: database name and login credentials
+DBDParams "dbname=htpasswd user=apache pass=xxxxxx"
+
+#Parameters for Connection Pool Management
+DBDMin  1
+DBDKeep 2
+DBDMax  10
+DBDExptime 60
+
+#Authentication Section
+<Directory /usr/www/myhost/private>
+
+    #mod_auth configuration for authn_dbd
+    AuthType Basic
+    AuthName "My Server"
+    AuthBasicProvider dbd
+
+    #authz configuration
+    Require valid-user
+
+    #SQL query to verify a user
+    #(note: DBD drivers recognise both stdio-like %s and native syntax)
+    AuthDBDUserPWQuery "select password from authn where username = %s"
+</Directory>
+
+
+
top
+

AuthDBDUserPWQuery Directive

@@ -85,8 +125,8 @@ -
top
-
Description:SQL query to look up a password for a user
Syntax:AuthDBDUserPWQuery query
@@ -114,4 +154,4 @@ - \ No newline at end of file + diff --git a/docs/manual/mod/mod_authn_dbd.xml b/docs/manual/mod/mod_authn_dbd.xml index fc66703fe74..3cf76ee5b74 100644 --- a/docs/manual/mod/mod_authn_dbd.xml +++ b/docs/manual/mod/mod_authn_dbd.xml @@ -57,6 +57,44 @@ DBDriverDBDParams +
+Configuration Example +

This simple example shows use of this module in the context of +the Authentication and DBD frameworks.

+
+#Database Management
+
+#Use the PostgreSQL driver
+DBDriver pgsql
+
+#Connection string: database name and login credentials
+DBDParams "dbname=htpasswd user=apache pass=xxxxxx"
+
+#Parameters for Connection Pool Management
+DBDMin  1
+DBDKeep 2
+DBDMax  10
+DBDExptime 60
+
+#Authentication Section
+<Directory /usr/www/myhost/private>
+
+    #mod_auth configuration for authn_dbd
+    AuthType Basic
+    AuthName "My Server"
+    AuthBasicProvider dbd
+
+    #authz configuration
+    Require valid-user
+
+    #SQL query to verify a user
+    #(note: DBD drivers recognise both stdio-like %s and native syntax)
+    AuthDBDUserPWQuery "select password from authn where username = %s"
+</Directory>
+
+
+
+ AuthDBDUserPWQuery SQL query to look up a password for a user
Description:SQL query to look up a password hash for a user and realm.