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 user3:oAejr3UGjRLXw 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.... |
All times are GMT -5. The time now is 10:56 AM. |