Hi all,

 

I'm trying to use mod_dbd to retrieve data based on user's IP address
and use that data for a customized http request header using
mod_headers, but can't seems to get dbd to work and I can't find any
good example on mod_dbd usage anywhere. This apache is setup for proxy
using mod_proxy and I use the following to get remote address:

 

SetEnvIfNoCase Remote_Addr "(.*)" HTTP_MY_REMOTE_ADDR=$1

 

RequestHeader add Test-IPADDR "%{HTTP_MY_REMOTE_ADDR}e"

 

I use the following info below to test (I use static instead of Remote
Addr to test):

 

DBDriver mysql

DBDPersist On

DBDParams
host=192.168.12.13,user=username,pass=password,dbname=freeradius

DBDPrepareSQL "select calledstationid from radacct where framedIPAddress
= '192.168.12.51' and AcctStartTime = (select max(AcctStarttime) from
radacct where framedIPAddress = '192.168.12.51')" STATIONID

 

I need to know what do I need to do so that DBD sql query use
Remote_Addr for query and how can I pass the result so that I can use it
with "RequestHeader add"? 

 

 

 

 

Cheers,

  

 

Reply via email to