httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Milanese <milanesefami...@yahoo.com>
Subject Re: [users@httpd] New implementation, shared binaries?
Date Tue, 05 Aug 2008 14:20:05 GMT
Well, that makes it baby stuff!
Thanks for the suggestion. I have my head stuck in mod_macro, which would be a bear for this.



----- Original Message ----
From: Krist van Besien <krist.vanbesien@gmail.com>
To: users@httpd.apache.org
Sent: Tuesday, August 5, 2008 9:33:51 AM
Subject: Re: [users@httpd] New implementation, shared binaries?

On Tue, Aug 5, 2008 at 14:08,  <PMilanese@nypl.org> wrote:
>
> Hi folks-
>
>  I am implementing a new infrastructure. It consists of pre-dev, dev,
> staging, and production boxes behind F5's. I also implemented a Polyserve
> matrix over the SAN.
>
>  That being said, what's everyone's take on shared binaries with the apache
> configs macro'd to the hostnames (including splitting of lock paths, logs,
> etc). Is there a module that allows for regex modification of variables
> (i.e., to make prod01,prod02,etc look for prod configs, etc).

On very flexible way to do this is to use mod_perl. You can then use
perl in your config. I for example have this in my config:

<Perl>
# We get the hostname, and use it to:
# generate a PID and lock file name
# generate log file names

        use Sys::Hostname;
        use Apache2::ServerUtil;

        $hostname = hostname();
        $PidFile = "logs/$hostname/httpd.pid";
        $LockFile = "logs/$hostname/accept.lock";

        my $serverroot = Apache2::ServerUtil::server_root() ;


        unless ( -d "$serverroot/logs/$hostname" ) {
                mkdir "$serverroot/logs/$hostname", 0755;
                }

        $CustomLog = "logs/$hostname/access.log" ;
        $ErrorLog = "logs/$hostname/error.log" ;

</Perl>

More about this on the mod_perl homepage and here:
http://perl.apache.org/docs/2.0/api/Apache2/PerlSections.html

Krist

-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
  "  from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


      
Mime
View raw message