LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-01-2004, 05:51 AM   #1
SuSE_fan
LQ Newbie
 
Registered: Apr 2004
Location: Provo, Utah, USA
Distribution: SuSE 9.0 Professional
Posts: 19

Rep: Reputation: 0
apache module mod_auth_mysql question


Hi there all,

I can't get 2 things working with my apache.

1. .htaccess
2. mod_auth_mysql

problems with .htaccess
--------------------------

I did everything possible I found on the net. Finally, this is what I want to do. Simple, protect the following directory

/srv/www/htdocs/phps/secret

so, I put a .htaccess file in the /secret directory as -

ErrorDocument 401 rejection.html
AuthUserFile /home/"my-name"/.htpass
AuthGroupFile /dev/null
AuthName "Book-O-Rama"
AuthType Basic
Require valid-user

then I created the .htpasswd file using htpasswd2 -bc command as

user1:nnWZGCar5gVY2
user2:4fQGZ/I/eE9kQ
user3Aejr3UGjRLXw

then I added the following lines in my /etc/apache2/httpd.conf file

<Directory /srv/www/htdocs/phps/secret>
AllowOverride all
</Directory>

NOTHING WORKS!!!!!!!!!!! Still I can see /srv/www/htdocs/phps/secret/index.html file .. GRRRRRRRRRRRRRRRRRRRRRR!!!!!

Any idea what did I do wrong? Or What Didn't I do?

2. Mod_auth_mysql problem
--------------------------------

I wanted to use MySQL authentication using php .. so, Mod_Auth_MySQL was the way (it looks secured too). I found one document online where it tells u how to make the DSO for your apache2. Now, it needs apxs command that i don't have. Luckily, I have the .so file I should have to do this. This file is in /usr/lib/apache2/ folder and its name is mod_auth_mysql.so

this is what the Documentation says about this .so file...

BUILD AND INSTALL NOTES
=======================

To build as a DSO:

- If you are using Apache 1.x:
apxs -c -D APACHE1 -lmysqlclient -lm -lz mod_auth_mysql.c

- If you are using Apache 2.x:
apxs -c -D APACHE2 -lmysqlclient -lm -lz mod_auth_mysql.c

If the mysql.h header file cannot be found, add the -I option to specify the
directory where mysql.h can be found.
If the mysqlclient library cannot be found, add the -L option to specify the
directory where libmysqlclient.so can be found.
For example:
apxs -c -D APACHE2 -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c

If you get warnings about "pointer/integer type mismatch" or "makes pointer
from integer without a cast", they can be safely ignored.
(Someday I want to get rid of these warnings though, since they annoy
some folks.)

After building the module, you need to install it to your modules directory.
- If you are using Apache 1.x:
apxs -i mod_auth_mysql.so

- If you are using Apache 2.x:
apxs -i mod_auth_mysql.la

Next, add the following directive to httpd.conf:
LoadModule mysql_auth_module modules/mod_auth_mysql.so

If using Apache 1.x, you may also need to add:
AddModule mod_auth_mysql.c

Finally, restart Apache and see if it starts up without any errors.

=======================

Notice what it says @ Next, add the following ....

LoadModule mysql_auth_module modules/mod_auth_mysql.so

If I add this line ..... apache2 daemon doesn't start. It just doens't find any file named module/mod_auth_mysql.so file ... not surprized at all!! THERE IS NO /MODULES folder inside my /srv/www/htdocs folder...

DID ANYONE HAVE This before ?????????????

ANY IDEA how to fix these two problems???????

Thanks in advance....
 
  


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
apxs -i mod_auth_mysql.so question cz1179 Linux - General 1 01-23-2005 09:01 AM
Apache won't start, problem with libcppu and mod_auth_mysql.so Null537 Linux - Software 3 05-29-2004 09:32 AM
apache module question thar Linux - Software 5 05-16-2004 09:14 AM
Loading Apache module question ?? wellsaj Linux - Software 2 11-05-2003 03:56 AM
Unable to start apache because of mod_auth_mysql error krumholz Linux - General 3 07-17-2003 11:18 AM

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

All times are GMT -5. The time now is 08:50 AM.

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