On Sat, Mar 15, 2003 at 01:00:18AM +0900, Nathan Ollerenshaw wrote: > On Saturday, March 15, 2003, at 12:02 AM, Thomas Eibner wrote: > > >On Thu, Mar 13, 2003 at 08:27:30PM +0900, Nathan Ollerenshaw wrote: > >>Resending this to this list as I got no response on users list. > >> > >>Currently, we are using flat config files generated by our website > >>provisioning software to support our mass hosted customers. The reason > >>for doing it this way, and not using the mod_vhost_alias module is > >>because we need to be able to turn on/off CGI, PHP, Java, shtml etc on > >>a per vhost basis. We need the power that having a distinct > >><VirtualHost> directive for each site gives you. > >> > >>Is there a better way? > > > >I once started a project to do this from a database, I eventually > >stopped > >as I couldn't figure out a nice way to enable/disable php,cgi,whatever > >on > >demand. Serving virtualhosts from documentroots you pull out of a > >database > >is no big deal. > > I wasn't thinking of anything radical. Just have a hook to set the > handler for a particular document (if it matches .php or .php4) to the > PHP module if it's allowed to, and serve it as a normal document if > not. Etc. > > I've not had a great delve in the hooks but nothing has suggested in > what I've looked at that it's not possible.
I'm not sure if it's as simple as you describe. What is to stop a user from placing a .htaccess file in a directory giving himself ability to give the right content type to execute a php script for instance? If you want suexec to work too, there might be further complications. (Just thinking out loud here) :) > I really need to get a proof-of-concept working; maybe this weekend if > my other half gives me a 'allowed to use computer' note for the teacher. What would you consider a proof-of-concept? I have my code lurking on some machine in cvs if you want to take a look at it.
