Apache Hacks
(20-minute talk, presented at the Pittsburgh Perl Workshop, October
2007)
Make Apache bend to your will! We'll look at two ways to have fun with apache and mod_perl.
First, we'll see how to write a simple Apache2 module that acts as an output filter (munging text in certain pages) according to parameters from your Apache configuration.
Next, we'll look at a more drastic modification - changing Apache::Registry itself to add some new behaviors, such as sending an email when a perl script dies.
This topic is based on modules developed at the Sol Genomics Network, http://sgn.cornell.edu. Attendees will be encouraged to adapt these techniques for their own nefarious purposes.
- Slides with notes (PDF, notes begin on page 18 or so)
- Slides (ODP)
- audio: coming soon
- Abstract and details on the PPW 2007 website
Code
- Code for Example::RewriteStuff
- Code for modified Apache::Registry available on request (I don't have a simplified example)
Relevant tutorials
- Input and Output Filters (excellent tutorial about mod_perl filters)
- Apache Server Config Customization in mod_perl
Helpful modules for writing filters
Read about other presentations I've given