Althou its not ideal - the whole procedure can be done dynamically by setting up just one VirtualHost and adding a perl handler to dynamically set the document_root :) But depending what sort of hosting your doing this solution may not be the best for you. For this to work you will need to turn canocal names off.
DJ On Wed, 2005-03-02 at 16:18 +0100, Roman wrote: > Hi all, > Is it possible to dynamically create VirtualHost's using mod_perl, > taking the value of each directive in a database ? If it is, how can I > do exactly please ? > Because actually, I'm doing things like : > ----- > push(@{ $VirtualHost{'*:80'} }, \%conf); > ----- > It works well, but with this method I must periodically restart Apache > and I think it uses as many memory as when we write > <VirtualHost></VirtualHost> 's in the Apache .conf file, does it ? > (there will be maybe thousands of VirtualHost's) > > Thank you in advance, > Roman. > > This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the organisation. Finally, the recipient should check this email and any attachments for the presence of viruses. The organisation accepts no liability for any damage caused by any virus transmitted by this email.