1. Do you use <Perl> sections?

I used to several years ago...

If I were you I woud stay away from any complex configurations using <Perl> sections. There are better ways to do it. All <Perl> sections really give you is the ability to dynamically configure the apache server, and there are other ways of achieving that. It sounds really cool and powerful, but it ends up being a lot more difficult and cumbersome than the other methods.

Your best bet is probably using a templated system that generates your config files right before the server starts. This gives you all the power that the <Perl> sections give you in dynamically configuring your server.

Another often overlooked module is the mod_macro module. This can also greatly simplify your config files.

Also, <Perl> sections are not supported under mod_perl2 yet.

One question... Why do you have mod_perl enabled on your main web server? If you have enough sites to require an automated config system, then you should really have a proxied mod_perl server. Personally I run 3 apache servers. A frontend server for static content with mod_proxy enabled, and a mod_perl backend and mod_php backend. I have one include file for each VirtualHost that is used by all three servers (by heavily using IfModule mod_perl.c sapi_apache2.c). Of course this setup precludes me from using <Perl> sections all together, since the frontend and mod_php servers can't do <Perl> sections...


In reply to Re: Apache <Perl> sections survey by cees
in thread Apache <Perl> sections survey by bsb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.