title: Remote IP for Apache authentication via DB
body: <p>I want only certain remote IPs to be able to use my Apache Proxy. Since the IPs are dynamic, they are in a database.
  Unfortunately, my attempt via AuthBasicFake and then a query to the remote IP in the database did not work. I didn't see any query in the database.</p>
  <p>Apache conf</p>
  <pre><code>Listen 0.0.0.0:1967
  AllowCONNECT 443 22 9443
  DBDriver mysql
  DBDParams &quot;host=xxxx,dbname=xxx,user=xxx,pass=xxxx&quot;
  DBDMin  4
  DBDKeep 8
  DBDMax  20
  DBDExptime 300
  
  &lt;VirtualHost *:1967&gt;
      &lt;IfModule reqtimeout_module&gt;
              RequestReadTimeout header=0  body=0
      &lt;/IfModule&gt;
  
          ServerAdmin xxxxx
          DocumentRoot /data/webserver/proxy/proxyDoc
          ServerName xxxxxx
          ErrorLog logs/proxy_error_log
          CustomLog logs/proxy_access_log combined
          LogLevel trace8
  
          # Proxy einschalten
          ProxyRequests On
          ProxyVia On
  
      ProxyTimeout 6666
          &lt;Proxy *&gt;
                  Order deny,allow
                  Allow from all
                  AuthName &quot;Proxy&quot;
                  AuthType Basic
                  AuthBasicFake %{REMOTE_ADDR}
                  AuthBasicProvider dbd
                  AuthDBDUserPWQuery &quot;SELECT PWD from table WHERE IP = %{REMOTE_ADDR}&quot;
                  require valid-user
          &lt;/Proxy&gt;
  &lt;/VirtualHost&gt;
  </code></pre>