LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-16-2005, 08:08 AM   #1
landenm
LQ Newbie
 
Registered: Aug 2003
Location: Springfield
Distribution: Suse 8.2
Posts: 5

Rep: Reputation: 0
Mysql & Httpd authentication


I have a RedHat ES 4 box setup with apache 2 and MySQL 4.1. We are hosting several internal webpages such as Eventum (MySQL's Issue/Bug tracking software), SugarcCRM, a calendar program and so on. We were planning on opening this box externally so users could work from home and still access these resources. However we wanted to implement authentication obviousley. So I started by adding the necessary directives to the httpd.conf file.
AuthType Basic
AuthName "IMS Intranet"
AuthUserFile etc/httpd/passwd
Require user testuser
Then I added a password with htpasswd to the directory specified. I tested this setup on a local machine before moving to the actual server and everything worked correctly. The problem is when I make the changes on the actual server it doesn't work. The username and password box shows up when trying to access the pages but upon entering the testuser credentials it just pops up again. It isn't accepting the username and password. I have been working on this for quite sometime now and have exhausted my knowledge on it. I even tried using an .htaccess file in the directory instead of the httpd.conf file and that had the same results. Upon looking at the Apache Error Log files I noticed this everytime I hit the server.

[Wed Jun 15 16:23:31 2005] [error] [client 127.0.0.1] MySQL ERROR: Table 'test.user_info' doesn't exist: /eventum
[Wed Jun 15 16:23:31 2005] [error] [client 127.0.0.1] MySQL user testuser not found: /eventum

Why would the apache authentication be trying to access the mysql table? It is correct that the test.user_info table doesn't exist but I'm failing to understand why these two are related. If anyone has any suggestions please let me know as I've been on this problem for about 5 hours now. Thanks.
 
Old 06-17-2005, 05:36 AM   #2
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
Could it bee that your Apache server is also configured with mysql authentication? Try not loading mod_auth_mysql in httpd.conf if you don't use it. If you need it, double check your whole configuration file(s) for conflicting rules.
 
Old 06-17-2005, 07:43 AM   #3
landenm
LQ Newbie
 
Registered: Aug 2003
Location: Springfield
Distribution: Suse 8.2
Posts: 5

Original Poster
Rep: Reputation: 0
I have gone through my httpd.conf more time and I can't seem to find anyhting that is authorizing MySql Authentication. Furthermore, and I'm not for sure if this is a RedHat thing or not, there is a directory httpd.conf that contains module scripts. It is processed just like LoadModule in the httpd.conf file. Any files with extension of .conf in this directory are loaded in alphabetical order. There was a mod_auth_mysql file in here that I removed. Then after re-starting apache it continued to give the same error. So I thought, what the heck. I'll just try mysql authentication to see if that works. So I placed the mod_auth_mysql file back in the directory, edited my htaccess file with the following directives.

AuthType Basic
Require valid-user
Auth_MYSQL_General_DB authentication
Auth_MySQL_Username_Field username
Auth_MySQL_Password_Field password

After re-starting Apache I get the following error in the log after trying to access the site.

[Fri Jun 17 07:39:46 2005] [alert] [client 127.0.0.1] /var/www/html/.htaccess: Invalid command 'Auth_MYSQL_General_DB', perhaps mis-spelled or defined by a module not included in the server configuration
[Fri Jun 17 07:39:46 2005] [alert] [client 127.0.0.1] /var/www/html/.htaccess: Invalid command 'Auth_MYSQL_General_DB', perhaps mis-spelled or defined by a module not included in the server configuration

So it seems that I can't win. Either way, if I try to use MySql authentication or just try to use a password file, it throws some kind of MySql error. Any help would be appreciated for resolving this issue. RedHat support seems to be set on not supporting apache issues. Great!! That's what I bought it for!!
 
Old 06-17-2005, 02:50 PM   #4
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
To use mysql authentication, read http://modauthmysql.sourceforge.net/CONFIGURE
 
  


Reply



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
PHP & Mysql Authentication Savahn Programming 0 03-14-2005 01:22 PM
Proftpd & MySQL Authentication Help Needed CyonyC Linux - Newbie 3 06-23-2004 07:01 PM
ProFTPd & MySQL Authentication Help CyonyC Linux - Software 4 06-22-2004 03:37 PM
Apache (httpd) 2.0 conf authentication problem HELP!!! bleah-man Linux - Software 14 08-18-2003 09:04 AM
Help w/ POP3 Server & MySQL Authentication ryanolson Linux - Networking 0 11-19-2001 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:46 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
Open Source Consulting | Domain Registration