Running Apache with PHP5 and PHP4 modules on the Same Linux Server
Unfortunately, we still need to maintain some old PHP4 apps for customers along with PHP5 apps. This causes a lot of grief for in-house developers who tend to hate to support old PHP4 stuff. On top of it, maintaining PHP5 and PHP4 modules for Apache on same development server is a painful experience to say the least. If you are [...]
« read more »Quick and Dirty Apache Bandwidth Report Hack in Perl
Google Analtyics, Quantcast etc are nice for marketing types. We needed a quick-and-dirty bandwidth report based on Apache access log. So whipped out the following perl script to do just that. #!/usr/bin/env perl use Time::DaysInMonth; $|++; my %months = (‘Jan’ => 1, ‘Feb’ => 2, ‘Mar’ => 3, ‘Apr’ => 4, ‘May’ => 5, ‘Jun’ => 6, ‘Jul’ => 7, [...]
« read more »Disabling SSL v2 in Apache/SSL
Today we found out that one of the client sites had their precious hacker-safe badge dropped because the Web server that they were running was offering SSL v2 support. So we decided to investigate by running: $ openssl s_client –ssl2 –connect www.clienthostname.com:443 We were able to connect! This confirmed that we had SSL v2 enabled Apache, which is default when [...]
« read more »Quick and Dirty Apache Log Analyzer to Find Top-100 IP Visits
We do not run local log analysis program since most customers rely on off-site Google Analytics. So we find ourselves often writing on-the-fly awk scripts to find the top-100 or top-1000 IP visitors from time to time when debugging site performance issues. Who hasn’t found their sites slow thanks to crawlers jamming the site? So to avoid writing ugly awk [...]
« read more »Output Filtering Using PHP
We needed a prototype filter that allows us to filter Web pages generated by PHP scripts to be post processed using an Apache output filter. In addition, we needed to write the filter in PHP as well. The filter will simply take the HTML (text/html) output generated by a third-party PHP application and do some post processing before sending it [...]
« read more »Compiling Apache with Old Version of APR Utils…
Just tried to compile Apache on a system with APR utility version 1.0 and got errors. To remedy, just told configure to use –with-included-apr which makes it use the bundled 1.2 APR libraries. Worked like a charm.
« read more »Another 64-bit Headache Installing Apache on CentOS 5.3
We planned to upgrade an existing 64-bit CentOS 5 server this weekend. The upgrade caused a bit of a headache that is worth documenting for future reference. Getting CentOS 5 Upgraded to CentOS 5.3 This went like a breeze as all we did is run: nohup yum –y upgrade & and in the background the CentOS upgrade continued for about [...]
« read more »