LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



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

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


Hello,

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:

Code:
<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_uid_field users.name
  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_group_field role.name
  Auth_PG_grp_user_field users.name
  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}
  <LimitExcept GET PROPFIND OPTIONS REPORT>
    Require group code_maintainer
  </LimitExcept>
  <Limit GET PROPFIND OPTIONS REPORT>
    Require group code_reader
  </Limit>
</Location>
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:

Code:
[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 99.236.5.55] (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:

Code:
[Sun Jul 05 13:03:48 2009] [error] [client 99.236.5.55] 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
Mleahy
Member
 
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.
 
  


Reply


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 10:11 PM.

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