I'm using Slackware 10.0 and complied apache 2.0.52 and mod_auth_mysql 2.7.0
Everything it's looking fine but and can't get the new window where I can type de username and password. My situation looks like Mauro's problem but I try the same config and don't have sucess.
here some command that I try: Thanks any away
Neto - Brazil
Don't worry about your english - it's great. And much better than my Portugese! :-)
You're problem is the location of your commands. These are not valid in a <Location> entry; they must go in a <Directory> entry or an .htaccess file in the appropriate directory (with the appropriate configuration options).
Try this in your <Virtual Host> section of your httpd.conf:
I'm talking about the configuration options in your httpd.conf file. You will need to set up a <virtual host> and one or more <directory> entries.
You can place the mod_auth_mysql files in the appropriate <directory> entries (preferred - but you need to restart Apache), or set the AllowOverride option to be able to set the authorization up in your .htaccess file. See the Apache documentation for more details.
One other thing - looking at the module, the name you use in the <IfModule> entry may be "mysql_auth_module". I'll have to check this out tomorrow (it's dinner time! :-) ).
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It works!!! Thank you! Works using the Apache options AllowOverride All and placing the .htaccess file in the directory. Using the <IfModule> dosen't work.
Any way...Thanks!!
See you...
Neto
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the feedback - I'm glad it's working for you.
However, I don't know why the IfModule didn't work. I tried it on a test system, and it worked fine - if the module was loaded, I got the logon prompt. Also, if I changed it to something else, I didn't.
The only difference between my setup and yours is I had the <IfModule></IfModule> statements within the <Directory></Directory> block, instead of outside of it, but I don't think that should matter.
I did not try it in the .htaccess file - but to use .htaccess for authentication, you must have AllowOverride set to AuthConfig or All, and .htaccess must be in the directory you wish to protect.
Thanks again for the feedback.
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, first my appologies about my english.
I'm using Slackware 10.0 and complied apache 2.0.52 and mod_auth_mysql 2.7.0
Everything it's looking fine but and can't get the new window where I can type de username and password. My situation looks like Mauro's problem but I try the same config and don't have sucess.
here some command that I try: Thanks any away
Neto - Brazil
/usr/local/apache/bin/apxs -c -D APACHE2 -I/usr/local/mysql/include -L/usr/local/mysql/lib -lmysqlclient -lm -lz mod_auth_mysql.c
/usr/local/apache/bin/apxs -i mod_auth_mysql.la
AFTER THAT THE MODULE WAS IN /usr/local/apache/modules/
I add the line in http.conf:
LoadModule mysql_auth_module modules/mod_auth_mysql.so
and this configuration on http.conf:
***********************************************
<IfModule mod_auth_mysql.c>
<Location /usr/local/apache/htdocs/private/>
AuthType Basic
AuthMySQLHost localhost
AuthMySQLUser MYSQL_USER
AuthMySQLPassword MYSQL_PASSWORD
AuthMySQLDB MYSQL_DATA_BASE_
AuthMySQLUserTable MYSQL_DATA_BASE_TABLE
AuthMySQLAuthoritative On
AuthMySQLKeepAlive off
AuthMySQLEnable on
</Location>
</IfModule>
*********************************************
Hello, Neto,
Don't worry about your english - it's great. And much better than my Portugese! :-)
You're problem is the location of your commands. These are not valid in a <Location> entry; they must go in a <Directory> entry or an .htaccess file in the appropriate directory (with the appropriate configuration options).
Try this in your <Virtual Host> section of your httpd.conf:
<IfModule mod_auth_mysql.c>
<Directory /usr/local/apache/htdocs/private>
AuthType Basic
AuthMySQLHost localhost
AuthMySQLUser MYSQL_USER
AuthMySQLPassword MYSQL_PASSWORD
AuthMySQLDB MYSQL_DATA_BASE_
AuthMySQLUserTable MYSQL_DATA_BASE_TABLE
AuthMySQLAuthoritative On
AuthMySQLKeepAlive off
AuthMySQLEnable on
</Directory>
</IfModule>
It should work better.
Jerry
Jerry,
you are fast man!! Thanks for your atention!
Sorry but dosen't work. When you said: "(with the appropriate configuration options)." This configuration was something in Apache's configuration?
I Just used:
./configure --prefix=/usr/local/apache
see you... Come to Brazil and learn more portuguese I'm sure you will enjoy!!
Neto
Neto,
I'm talking about the configuration options in your httpd.conf file. You will need to set up a <virtual host> and one or more <directory> entries.
You can place the mod_auth_mysql files in the appropriate <directory> entries (preferred - but you need to restart Apache), or set the AllowOverride option to be able to set the authorization up in your .htaccess file. See the Apache documentation for more details.
One other thing - looking at the module, the name you use in the <IfModule> entry may be "mysql_auth_module". I'll have to check this out tomorrow (it's dinner time! :-) ).
Jerry
Jerry,
It works!!! Thank you! Works using the Apache options AllowOverride All and placing the .htaccess file in the directory. Using the <IfModule> dosen't work.
Any way...Thanks!!
See you...
Neto
Nato,
Thanks for the feedback - I'm glad it's working for you.
However, I don't know why the IfModule didn't work. I tried it on a test system, and it worked fine - if the module was loaded, I got the logon prompt. Also, if I changed it to something else, I didn't.
The only difference between my setup and yours is I had the <IfModule></IfModule> statements within the <Directory></Directory> block, instead of outside of it, but I don't think that should matter.
I did not try it in the .htaccess file - but to use .htaccess for authentication, you must have AllowOverride set to AuthConfig or All, and .htaccess must be in the directory you wish to protect.
Thanks again for the feedback.
Jerry