|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Basically I want to set up a password protected directory using .htaccess. I
am expecting maybe 1000 logins per day so rather than use a flatfile .htpasswd file I decided to use a DBM file. I can use flatfile no worries. Enter auth_dbm_mod and auth_db_mod. I have both these on the server as well as AnyDBM_File, DB_File, SDBM_File and GDBM_File (no NDBM_File). I have tries all combinations of auth_dbm_mod with AnyDBM_File, SDBM_File and GDBM_File and auth_db_mod with DB_File just like in the Apache Docs. .htaccess can't find the password. .htaccess is -------------------- AuthDBUserFile /home/correctpath/cgi-bin/data/htpass AuthName "Members Test Area" AuthType Basic Require user agony -----------------or AuthDBMUserFile /home/correctpath/cgi-bin/data/htpass AuthName "Members Test Area" AuthType Basic Require user agony ---------------- The relevent PERL code creating the DB file is +++++++++++ use DB_File; or use GDBM_File; or use AnyDBM_File; or use SDBM_File; and to add the username password $cryptpass = crypt($pass, as); dbmopen(%newentry,"$datapath/htpass",0666); $newentry{$username} = $cryptpass; dbmclose(%newentry); +++++++++++ I can't see what I'm doing wrong. Any ideas? Michael |
|
#2
|
|||
|
|||
|
Is your cgi-bin ScriptAlias'ed? If so, move your /data/htpass elsewhere. Configuring Apache to use both mod_auth_dbm and mod_auth_db are known to cause problem. That is why most precompiled binary of Apache always add --disable-module=auth_dbm and --enable-module=auth_db explicitly.
|
|
#3
|
|||
|
|||
|
Well I got rid of auth_dbm_mod and placed my db file into a http directory chmod 777 (just to be safe). Still no luck, unfortunately I don't have access to error logs so I'm really doing this blind. I don't think the problem was the db file in the cgi-bin as the flat file database works fine in the cgi-bin. I'll have access to a server with error logs next week so I'll try and figure out the problem on that. Untill then flatfile db will have to do.
Thanks FreeBSD for taking the time to give me a few pointers much appreciated. ![]() |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > auth_db_mod |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|