httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Ballé <>
Subject [users@httpd] Re: Regarding Apache HTTP Authentication with an Oracle Database
Date Fri, 07 Nov 2008 11:57:42 GMT
Hi, here is a procedure to get apache 2.2 + * on linux 
(base debian 4 etch apache by apt-get standard)

*Install Oracle instant client :

get files from 

get and
unzip them in /opt/oracle wich you create if not existent.
make sure you got a symlink /opt/oracle/instantclient to the current 
version (/opt/oracle/instantclient_11_1 now).

Note that the main problem to get the * is that the 
library has move from lib directory in oracle client to 
oracle client main directory.
adding a symlink solves the compile issue :

ln -s /opt/oracle/instantclient /opt/oracle/instantclient/lib

then go on :

cd /tmp
cd /usr/src
tar -jxvf /tmp/apr-1.3.3.tar.bz2
cd apr-1.3.3
./configure --prefix=/usr
make install

cd /tmp
cd /usr/src
tar -jxvf /tmp/apr-util-1.3.4.tar.bz2
cd apr-util-1.3.4
./configure --with-apr=/usr/src/apr-1.3.3 
--with-oracle-include=/opt/oracle/instantclient/sdk/include --prefix=/usr
make install

create tables in oracle :

create table apache_authn
        user_id varchar2(50)
        ,password varchar2(50)
        ,primary key (user_id)

then change you virtualhost config :
    DBDriver oracle
    DBDParams "user=test pass=test dbname=XE server="
    DBDPersist off
# You should test with Persist off then change to on if it works.

and configure a directory :
    <Directory /var/www/test>
        AllowOverride None
        AuthType Basic
        AuthName "Acces utilisateur requis"
        AuthBasicProvider dbd
        Require valid-user
        AuthDBDUserPWQuery "SELECT password FROM apache_authn WHERE 
user_id = %s "

restart apache.

password format is the same that those in the usual password file. just 
take what is after the ":".
source files mention that sha1 and md5 password should work.

Samuel Ballé


    Hi Rajaopal M.,

    In order to use the, and modules with
    mysql I had to build the mysql dbd driver provided in the arp-util
    (within Apache httpd-2.2.9).

    To accomplish this I used the configure flag noted in apr-util:

    ./httpd-2.2.9/srclib/apr-util> configure --help | grep -i mysql
    --with-mysql=DIR enable MySQL DBD driver

    I passed this --with-mysql flag to the top level configure when
    configuring httpd-2.2.9. Even though it doesn't undestand this flag,
    it passes it on to lower level configurations, such as when
    configuring apr-util.

    I have no experience with Oracle, but here are the Oracle configure
    flags I found in the configure help in apr-util:

    ./httpd-2.2.9/srclib/apr-util> configure --help | grep -i ora
    --with-oracle-include=DIR path to Oracle include files
    --with-oracle=DIR enable Oracle DBD driver; giving ORACLE_HOME as DIR

    Hope this helps, -Steve

        Rajagopal M. wrote:

        Hi Steve,

        I am RajaGopal Maddi. I have seen from one of the blogs in that you have used MySQL database for HTTP
        Authentication in Apache?

        Is it resolved for you? Steve, what should I do for doing the
        same with Oracle Database? Where do we get the
        ** from?

        Please throw some light on interaction with the Oracle Database.


        RajaGopal Maddi

View raw message