ApacheThe idea of limiting user’s vhost resource usage on Apache brings me to give the suPHP a try. suPHP makes PHP process owned by the owner it self, not “nobody” or apache user, enabling us to limit resource per vhost.

After setting up suPHP with rlimit rule per vhosts, I see that Rlimit really works. Apache kills all PHP execution that hit the Rlimit. So, basically we can have a containers that lock user’s PHP execution, thus preventing user to overload the server with buggy or highload type of PHP script.
But a new problem arised. When PHP execution killed, it generate coredump files. Coredump files are very useful to traceback any crash issues that occur during PHP execution. But I got them all over user’s directory, especially  on user’s directory that have a highload type of PHP script. The size may vary from 1MB to 40MB (on my system). They eat up users space every time a greedy resource PHP execution killed. Read the rest of this entry »

Munin Monitoring ToolInstalling Munin on a latest Centos 5 via WHM (cPanel) can be very painful (takes a long night googling for me.. lol). On my server (CENTOS Enterprise 5.2 x86_64) – under “Manage Plugin” menu on WHM, it shows : Can’t locate RRDs.pm.

First you have to install rrdtool, rrdtool-devel, and perl-rrdtool. Here’s how to install it (it works for me) :

wget http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.23-1.el5.rf.x86_64.rpm
wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-devel-1.2.23-1.el5.rf.x86_64.rpm
wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.23-1.el5.rf.x86_64.rpm
rpm -ivh rrdtool-1.2.23-1.el5.rf.x86_64.rpm rrdtool-devel-1.2.23-1.el5.rf.x86_64.rpm perl-rrdtool-1.2.23-1.el5.rf.x86_64.rpm

And now you’re ready to install Munin through WHM.

Recently I installed a new server with the latest cPanel release (cPanel 11.23.3-R25623) on Centos 5 64bit version. I notice that under “Tweak Setting” menu on WHM, there are new features that interesting :

Add proxy VirtualHost to httpd.conf to automatically redirect unconfigured cpanel, webmail, webdisk and whm subdomains to the correct port (requires mod_rewrite and mod_proxy)

Automatically create cpanel, webmail, webdisk and whm proxy subdomain DNS entries for new accounts. When this is initially enabled it will add appropriate proxy subdomain DNS entries to all existing accounts. (Use /scripts/proxydomains to reconfigure the DNS entries manually)

When I give a try on those feature, it did work. cPanel become accessible through common http port (80) (instead of port 2082) when we access http://cpanel.domainname.tld. It also work for webmail, WHM, and webdisk.

Meaning we probably dont need a cPanelProxy anymore.