Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-05-2009, 05:09 AM   #1
Registered: Jan 2004
Posts: 43

Rep: Reputation: 15
Apache2 + mod_auth_pgsql = 500 Internal Server Error on Debian Lenny


I'm setting up a VPS running Debian Lenny + Apache 2 + PostgreSQL 8.3. It is hosting a Drupal website, and I want to use the user accounts in the Drupal database in PostgreSQL to run the authentication for other web directories.

Here's the config I have for one my web directories used for a svn repo:

<Location /project/svn>
  DAV svn
  SVNPath /var/www/project/svn
  AuthType Basic
  AuthName "MapChat Subversion Repository"

  Auth_PG_host localhost
  Auth_PG_port 5432
  Auth_PG_user drupal
  Auth_PG_pwd [password]
  Auth_PG_database drupaldb
  Auth_PG_pwd_table users
  Auth_PG_pwd_field users.pass
  Auth_PG_pwd_whereclause  " and users.status = 1 and users.access <> 0 "
  Auth_PG_grp_table "users, users_roles, role"
  Auth_PG_grp_whereclause " and users.uid = users_roles.uid AND users_roles.rid = role.rid "
  AUTH_PG_hash_type MD5

  RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    Require group code_maintainer
    Require group code_reader
When I try connecting to the path, I get a 500 internal server error message after entering my username/password. If I check the apache server log, I see the following:

[Sun Jul 05 12:57:57 2009] [error] Internal error: pcfg_openfile() called with NULL filename
[Sun Jul 05 12:57:57 2009] [error] [client] (9)Bad file descriptor: Could not open password file: (null)
The same configuration works fine on another Fedora 8 installation with no complications. I read somewhere that I need to add AuthUserFile /dev/null to the config. This prevents the internal server error, but doesn't actually work. Instead, I get user not found errors:

[Sun Jul 05 13:03:48 2009] [error] [client] user mgleahy not found: /project/svn/
If anyone has a clue what the problem is, I'd be happy for any suggestions.

As an aside, installing libapache2-mod-auth-pgsql didn't add a configuration file for the lib. I manually created a file called auth_pgsql.load in /etc/apache2/mods-available, then used a2enmod auth_pgsql to enable it.

Last edited by Mleahy; 07-05-2009 at 05:26 AM.
Old 07-05-2009, 05:16 AM   #2
Registered: Jan 2004
Posts: 43

Original Poster
Rep: Reputation: 15
Nevermind...just found a post that revealed that I apparently need this in my config:

AuthBasicAuthoritative Off

Strange that I didn't need that on the Fedora setup.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting 500 Internal Server Error !! Deepaks Linux - Server 0 04-11-2009 07:49 AM
500 Internal Server Error shahz Red Hat 9 03-31-2009 04:05 AM
500 Internal server error fa_khan50 Linux - Newbie 0 01-02-2008 01:13 AM
zenoss 500 Internal Server Error? kav Linux - Software 0 07-13-2007 12:50 PM
500 Internal Server Error bship Linux - Software 5 01-19-2007 05:48 PM

All times are GMT -5. The time now is 07:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration