Application Performance Monitor (APM)

Application Performance Monitor (APM) is used to monitor application performance. This help you identify problems with your application. If you are developing an application, this is very helpful as you can see changes in application performance during a software upgrade, this allow you to identify perofrmance issues related to changes in your application.

Here are some useful sites that provide Application Performance Monitoring solutions.


serverpilot is a SAAS hosting control panel for web servers.

It use nginx as proxy with apache web server as backend. Services used by serverpilot are

Config file locations

Web site specific configuratoons stored in vhosts.d folder inside apache/nginx config folders.

Apache installed at

Plesk Nginx

How to enable gzip on Plesk Nginx

To enable gzip on Plesk server with Nginx proxy, go to

Click on the domain for which you need gzip compression enbaled.

Plesk Nginx

click on “Apache & nginx Settings”. On next page, scroll down, add following to “Additional nginx directives” text box.

Plesk Additional nginx directives

To verify gzip is working, you can open a file directly in browser. Check response headers in browser develoer tool, you should see gzip.

verify gzip in chrome developer tools

See Plesk

Redirect a folder to another

To redirect a folder to another using .htaccess, create



if new folder is on another domain, you can use

See Redirect


MySQL Database Character Set and Collation

To change MySQL database char set and collation, run

To usee current char set and collation, run

You can specify char set when creating database with following syntax


sysdig is a tool like top, but more powerful, it is a combination of tools like htop, iftop, lsof.

To install sysdig on ubuntu, run

To see files using top IO, run

To access top like GU, run

Password Protect Site using htaccess

To password protect a web site or a sub folder using .htaccess, create a .htaccess file in the folder.

Add following content

In this case, i used /etc/apache2/site-logins as AuthUserFile, this will store all user and password. You can change this file path to whatever you need. Make sure it is not accessable from public, so keep it outside of document root of your web site.

Now create a user with command

CageFS command not working for user

I have flvtool2 installed on the server. Path to binary file location was added in file /etc/cagefs/conf.d/vshare.cfg

The binary program works properly when running as root, but it fail when switching to a user that use CageFS.

The problem is fixed by editing file /etc/cagefs/

Add following lines

Now remount cagefs with

See cagefs

OpenLiteSpeed Monit

Monitor OpenLiteSpeed with monit

OpenLiteSpeed Monit

To monitor OpenLiteSpeed with monit on Ubuntu Server, create file

Add following content

Reload monit with

Now monit will monitor OpenLiteSpeed, restart if required. You can check status with

monit status openlitespeed

If you want to monitor if web server is responding to request, you can use