Even without modperl, There's More Than One Way To Do It. I like mod_rewrite for this sort of task. See the examples for Virtual host configurations in the 'Apache URL Rewriting Guide'.
If this is all you're using mod_perl for, then mod_rewrite is likely to be a better, slimmer option than mod_perl. If you're using mod_perl regardless, then it really comes down to what tools you feel happiest with. Andrew On 11 Jun 2002, simran wrote: > Date: 11 Jun 2002 14:02:59 +1000 > From: simran <[EMAIL PROTECTED]> > To: Marc Slagle <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: Possible module > > Hi Marc, > > Sounds like an interesting module... there is probably benifit in making > it public as i can envisage people who sell domains with a use for such > a module (to provide a custom "website coming soon" front page). > > Did you try using Apache's Mass Virtual Hosting though? And if you did > consider that, it would be interesting to know why you didn't end up > using it. > > simran. > > > On Tue, 2002-06-11 at 13:38, Marc Slagle wrote: > > I have written a module for one of our clients, and want to know if I > > should make it available on CPAN. My hope is that others might find > > it useful. > > > > The client had a system where he wanted all incoming requests for a > > site to have the exact same pages if you asked for anything except > > index.html. The index.html pages for each site were different, and > > were generated by him with names like index001.html for domain1.com, > > index002.html for domain2.com, etc. However, he had so many > > configured domains that his httpd.conf files were getting huge, and > > his httpd processes were getting bigger and bigger (this may not be a > > problem with apache 2, I wouldn't know.) > > > > We replaced the default translation handler with a perl one that > > grabbed the domain and matched it against a tied DB file if index.html > > was asked for (or just /). If the index wasn't asked for, then we > > just told apache where the directory was to get the files from. > > > > After switching to this system, the httpd processes shrank to 2-3 MB, > > and the number of sites configured to use this system was something > > like 100,000 individual domains or so, each sharing every single file > > except the index files. The regular httpd.conf only handled about > > 2000 before memory sizes became too big. The system also has handled > > 1.5 million hits in a day. > > > > The module adds a directive to the httpd.conf file: PerlIndexConfig, > > which sets the directory the common files are located and the DB file > > to use for determining the index file locations. > > > > All I want to know is: Does anybody think this kind of module is > > useful enough to be made public? Any feedback would be great. > > Thanks. > > > > Marc Slagle >