I think you want AuthType Digest if you are using AuthDBDUserRealmQuery.

If you want to do Basic auth you want AuthDBDUserPWQuery.

https://httpd.apache.org/docs/2.4/mod/mod_authn_dbd.html

Kind Regards,

Scott

First Class Watches
9 Warwick Road
Kenilworth
CV8 1HD
Warwickshire
United Kingdom

On 18 August 2016 at 11:35, Emanuele Bastianelli <manu.re...@gmail.com>
wrote:

> Hi,
>
> I'm using Apache 2.4.7 on Ubuntu 14.04 and I need to use the mode
> mod_auth_dbd with the AuthDBDUserRealmQuery. I have mysql installed and
> working. I followed the documentation, activated all the needed apache
> modules (hopefully), and configured the 000-default.conf file, under the
> VirtualHost field (I'll need this authentication in a reverse proxy mode).
> First, I tested the simple AuthDBDUserPWQuery directive, that works without
> problems.
>
> The issue occurs when I activate the AuthDBDUserRealmQuery directive,
> removing the AuthDBDUserPWQuery. The resulting VirtualHost file is
>
> <VirtualHost *:80>
>         ServerAdmin webmaster@localhost
>         DocumentRoot /var/www/html
>
>         ErrorLog ${APACHE_LOG_DIR}/error.log
>         CustomLog ${APACHE_LOG_DIR}/access.log combined
>
>         DBDriver mysql
>         DBDParams "host=localhost port=3306 user=my_user pass=my_password
> dbname=apacheauth"
>         DBDMin  2
>         DBDKeep 4
>         DBDMax  10
>         DBDExptime 300
>
>         <Directory /var/www/html>
>           AuthName "You Must Login"
>           AuthType Basic
>           AuthBasicProvider dbd
>           Require valid-user
>           AuthDBDUserRealmQuery "SELECT ENCRYPT(password) FROM password
> WHERE username = %s AND realm = %s"
>         </Directory>
> </VirtualHost>
>
> When I try to access with user and password through basic authentication,
> what happens is that the error.log file of apache is reporting this error:
>
> [authn_dbd:error] [pid 40782:tid 140490237867776] [client
> some_ip:some_port] AH01654: No AuthDBDUserPWQuery has been specified
>
> I searched a lot on the Web, but I didn't find anything.
>
> Thank you,
> Best,
>
> EB
>
> PS: I already tried the query both with ENCRYPT and without it.
>

-- 


This message and any of its attachments are confidential and may be 
privileged or otherwise protected from disclosure.
If you are not the intended recipient, please contact the author/sender and 
delete this message and any attachment.
If you are not the intended recipient you must not copy this message or 
attachment or disclose the contents to any other person.

First Class Watches Ltd. 
Registered Office: 9 Warwick Road, Kenilworth, Warwickshire, CV8 1HD

Reply via email to