'No AuthDBDUserPWQuery has been specified' error log when AuthDBDUserRealmQuery is set in Apache 2.4
<p>I'm trying to use <code>mod_authn_dbd</code> for authentication in Apache 2.4. I set up everything according to the documentations, and I've tested it with the directive <code>AuthDBDUserPWQuery</code> and it works finely. Now, if I try to use instead the directive <code>AuthDBDUserRealmQuery</code>, and I try an access to server, the <code>error.log</code> shows</p>

<pre><code>[authn_dbd:error] [pid 24419:tid 140371559429888] [client some_ip:some_port] AH01654: No AuthDBDUserPWQuery has been specified
</code></pre>

<p>In the following I report my <code>000-default.conf</code> file (I'm putting my stuff there as I need to Reverse Proxy).</p>

<pre><code>&lt;VirtualHost *:80&gt;

    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_pass dbname=the_db"
    DBDMin  2
    DBDKeep 4
    DBDMax  10
    DBDExptime 300

    &lt;Location /&gt;
      AuthName "You Must Login"
      AuthType Basic
      AuthBasicProvider dbd
      AuthDBDUserRealmQuery "SELECT ENCRYPT(password) FROM password WHERE username = %s AND realm = %s"
      Require valid-user
    &lt;Location/&gt;

&lt;/VirtualHost&gt;
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
</code></pre>