You can't use the server name in the AuthMySQLUserCondition. Connection to the host (and database selection) is done before the SQL statement is executed.
You can specify the host name or ip address in the AuthMySQLHost.
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think my question was not clear. Let me try to explain what my goal is:
I want to use this mod to autheticate users to awstats. I have serveral virtual hosts, so when trying to authenticate, I need to know which virtual host is being called from the client in order to authenticate using the right credentials.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This sounds like it might be a useful addition. Could you please pass along the actualy patch you used? We will consider it for inclusion in a new release (perhaps not the next one - it's almost ready to go - but the one after that).
It would help if you'd post it in the Request for Enhancements (RFE) section.
Jerry
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can I use the servername of the vhost in the AuthMySQLUserCondition config?
Guido,
You can't use the server name in the AuthMySQLUserCondition. Connection to the host (and database selection) is done before the SQL statement is executed.
You can specify the host name or ip address in the AuthMySQLHost.
Jerry
I think my question was not clear. Let me try to explain what my goal is:
I want to use this mod to autheticate users to awstats. I have serveral virtual hosts, so when trying to authenticate, I need to know which virtual host is being called from the client in order to authenticate using the right credentials.
I figured it out. I had to modify the source of mod_auth_mysql.c
I added a small routine for string replacement.
Added this string replacement to the get_mysql_pw function.
My AuthMySQLUserCondition:
AuthMySQLUserCondition "Domain LIKE '%%v'"
Everthing works the way I want.
Guido,
Ok, now I understand what you're trying to do.
This sounds like it might be a useful addition. Could you please pass along the actualy patch you used? We will consider it for inclusion in a new release (perhaps not the next one - it's almost ready to go - but the one after that).
It would help if you'd post it in the Request for Enhancements (RFE) section.
Jerry
Jerry
Guido,
OK, I found your patch in the Patches section. Thanks for uploading it!
I've moved it to the RFE section so we can look at it for the next release.
Jerry