- Jul 23, 2005
- 2,070
- 0
- 0
So here's the deal. I'm rather new to apache, but trying to learn. So I set it up on my Linux server and got everything working, as far as just my basic site. I've got additional folders that I'd like to be able to access, but I want to restrict who can access them. So I read up on DBM and am trying to implement it. That way I can just require a log in and all that and be good to go.
So I've included 'LoadModule authn_dbm_module modules/mod_authn_dbm.so' in the module section. Version 2.2 seems to load pretty much all of the common modules automatically. I then put in:
<Directory "/mnt/Drive/Website/Games">
AuthName "Restricted Stuff"
AuthType Basic
AuthDBMUserFile /usr/local/apache2/passwd/users
Require valid-user
Order allow,deny
Allow from all
</Directory>
I've got that directory aliased as the /Games directory on my website. I then used dbmmanage to create the file users.dat (not sure why .dat, but that's what was in the example on the apache website). Anyway, I then restarted apache, restarts just fine. I go to the website and the GUI pops up asking for username and password. I enter it, and then it dies.
I then get the error below in my error log:
"[Tue Feb 13 09:03:40 2007] [error] Internal error: pcfg_openfile() called with NULL filename
[Tue Feb 13 09:03:40 2007] [error] [client 192.168.15.100] (9)Bad file descriptor: Could not open password file: (null)"
Anyone got any ideas what I need to do to fix this? I know I could just restrict access via IP address, but I'd rather do it with username/password. Any help or ideas would be appreciated.
So I've included 'LoadModule authn_dbm_module modules/mod_authn_dbm.so' in the module section. Version 2.2 seems to load pretty much all of the common modules automatically. I then put in:
<Directory "/mnt/Drive/Website/Games">
AuthName "Restricted Stuff"
AuthType Basic
AuthDBMUserFile /usr/local/apache2/passwd/users
Require valid-user
Order allow,deny
Allow from all
</Directory>
I've got that directory aliased as the /Games directory on my website. I then used dbmmanage to create the file users.dat (not sure why .dat, but that's what was in the example on the apache website). Anyway, I then restarted apache, restarts just fine. I go to the website and the GUI pops up asking for username and password. I enter it, and then it dies.
I then get the error below in my error log:
"[Tue Feb 13 09:03:40 2007] [error] Internal error: pcfg_openfile() called with NULL filename
[Tue Feb 13 09:03:40 2007] [error] [client 192.168.15.100] (9)Bad file descriptor: Could not open password file: (null)"
Anyone got any ideas what I need to do to fix this? I know I could just restrict access via IP address, but I'd rather do it with username/password. Any help or ideas would be appreciated.
