in reply to VHosting large number of domains(50+), mod-perl

Why do you have mod_perl in a server that's only going to serve static pages? That's a huge waste of resources.

Use a very barebones Apache and generate its httpd.conf using Template Toolkit. No Perl per se required even, just a TT2 template and TT2's tpage script.

Or just switch to thttpd which maps virtual hostnames to directory names, with the explicit intent of letting symlinks handle aliases.

Makeshifts last the longest.

  • Comment on Re: VHosting large number of domains(50+), mod-perl

Replies are listed 'Best First'.
Re: Re: VHosting large number of domains(50+), mod-perl
by BUU (Prior) on Oct 05, 2003 at 00:17 UTC
    The server isn't only going to server static page. It's also going to serve a variety of other websites, many of them dynamic.

    As for Template Toolkit Isn't that a form of embedded perl + content management systems? What does that have to do with generating a httpd.conf?
    As for generating a httpd.conf, I assume you mean using perl to write a dynamic httpd.conf, perhaps reading a textfile containing the domain names and then writing <VirtualHost> sections directly in the .conf? Does this have any advantages over the mod_perl solution? I can't really see any disadvantages, except the outside generation requires another script to be run, with mod_perl you just restart apache.

    Well, I have apache running for my other websites, I would prefer not to have to run two web servers..
      No, TT2 is what its name says: a toolkit to use templates. It has nothing to do with any other part of content management, and while you can embed Perl that's not its purpose. Whether you generate HTML with it or anything else is up to you. merlyn uses it to generate his http.conf(s?) - that's where I first heard of this idea. And that's just one use. If you don't know about it yet, then have a look at it just because. TT2 is always good to have among one's assortment of tools.

      Makeshifts last the longest.

        Indientally, we used this technique to generate our conf files at eToys.com too. It's very handy when you have multiple QA, dev, and production environments, all with slight tweaks to the same basic config.