Single mod_perl Instance Serving Multiple Domains

I manage several low-traffic websites sites.  These sites use the classic 2-server Apache/mod_perl architecture.  The front-end server is a light Apache instance hosting a WordPress blog.  The heavy, back-end server is mod_perl-enabled Apache serving various web applications I’ve created.

To the best of my understanding, mod_perl/Apache can only set-up and cache a single database connection.  Is that right? Only one database connection per mod_perl instance?

But my applications need to access several databases.  All the databases are hosted on a single instance of MySQL.  I’ve set it up to use that single cached database connection, and also distinguish requests from the different front-end domains.  Lastly, I’m experiencing a problem using $r->push_handlers.  Let me tell you about it and ask for your feedback. First, the set up. Continue reading “Single mod_perl Instance Serving Multiple Domains”

Web Development Tools for the Well-Rounded Technologist

I’m a big fan of the Perl programming language.  A very long time ago, before computers became ubiquitous, I had a technical job which depended on computers.  Back then, computers typically were housed on a raised floor behind glass walls, and only the anointed elite actually worked ON the computers. But in my job, we had access to an AT&T 3B20 computer running UNIX. Our System Administrator was a pretty switched on guy and when I ask him to help me learn UNIX he was excited to have a pupil. I was totally jazzed to have a teacher.

The work environment was a Network Operations Center (NOC) for the telephone company. We monitoring telephone switches, which allowed us to experiment and play around to automate small tasks.  Our NOC monitored dozens of telephone switches, all of them writing their log messages into the 3B20.  Parsing those log files and creating reports was how I first learned to program using the Bourne Shell, sh. Continue reading “Web Development Tools for the Well-Rounded Technologist”