El Miércoles 22 Septiembre 2004 12:12, Fraser Campbell escribió: > On September 22, 2004 03:04 am, Johann Botha wrote: > > running a script from mod_rewrite was not reliable, sometimes it just did > > not work... restart apache and it worked again. maybe it was just the > > version I used. > > Hmm, I don't like the sounds of that. Hopefully it was just the version > you used. Or a problem with the script talking to LDAP, since my script > (at least for now) is self-contained I hope I don't run into issues. If my > solution proves problematic I will report back. > > > 2) I wanted to enable / disable things like PHPengine for the virtual > > host based on LDAP settings. > > You could do it in the script, if file extension is .php then rewrite the > request to a "cannot execute" message. Alternatively (what I had planned > to do) is just disable the engine in directories where I don't want it > (that would be using config files), something like this is supposed to > work: > > <Directory /var/www/net/wehave> > php_admin_flag engine off > </Directory>
I wonder how running a script inside a mod_rewrite rule is better that defining a new NameVirtualHost directive, moreover taking into account that that rewriting rule will run the script EVERY TIME a request reach the server, I hope you don't have high volume traffict to that server or you will go into troubles. I better follow this way ... httpd.conf (apache 1.3.X, apache 2.X doit automaticatly) ... Include /etc/apache/domains.d ... then simple create the <domain>.conf file from a template for example, and drop it inside /etc/apached/domains.d a simple /etc/init.d/apache reload and thats all, no need to check on every request to were should I get the files.