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

Reply via email to