httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Medina-Heigl Hernandez <ro...@rs-labs.com>
Subject [users@httpd] Mixing rewrite with authn_dbd: Rewriting based on path value stored in mysql table
Date Tue, 24 Feb 2009 11:58:02 GMT
Hello,

I'm working on an ISP/Hosting environment and I'm having trouble to figure
out how to solve a problem which (I think) involves mixing several
modules/concepts:
- pages should be protected with basic-auth where user database should
reside on MySQL (mod_authn_dbd). The mysql table basically contains 3
fields: user, password and path
- pages should be rewritten (mod_rewrite) based on authenticated user *and*
the path associated to that user.

So for instance, accesing to http://isp/stats/ should:
1.- Ask for user/pass
2.- If the user exists in MySQL table (and password is ok), the path
(associated to that user) should be retrieved from the same table. Let's
say we have user "Tom" with path "/home/Tom".
3.- Finally Apache should serve /home/Tom/stats/.

Is this achievable?


Lastly, I'm interested on docs/tutorials about how to setup a more or less
complex apache setup useful for a hosting solution, being the goals:
1) Trying to minimize (ideally avoid) the number of restarts to Apache when
a change is made (a new domain is set up, etc).
2) Storing all the info in mysql tables.
3) Flexibility: be able to set up protected dirs for different domains,
having groups of users, etc.

I've seen some ideas like:
http://httpd.apache.org/docs/2.2/vhosts/mass.html
or
http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html
but they are quite simple and not sufficiently flexible.

Any more advanced tutorials/documents would be appreciated.

Thank you.

Cheers,
-Roman


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message