install php redis extension in aaPanel

redis php extension aapanel

To install php redis extension on aaPanel control panel, run

If you get php-config not found error, you need to create a symlink. This is for server with PHP 7.4 installed, if your server have differnt version of PHP, you may need to change path.

Now continue the installation from “./configure” command, it […]

Read More…

React Application showing 404 error on refresh

On Apache server, React Application works fine, but if you refresh a page, it shows 404 error. This is because the application use BrowserRouter. To fix the error, create a .htaccess file with following content

Put this on the folder where your application index.html is or in Apache Virtual Host entry. See htaccess […]

Read More…

Change SSH port in CyberPanel

CyberPanel Change SSH port

CyberPanel is a free open source control panel for web hosting. It use OpenLiteSpeed web server. You have the option to use Commercial LiteSpeed web server with CyberPanel. To change SSH port on CyberPanel server, login to CyberPanel, then go to

From the left side menu. On next page, you will get option to […]

Read More…

Amazon Elastic Container Registry

amazon docker registry (ECR)

Amazon Elastic Container Registry is used to store docker images in Amazon AWS cloud. To create a repository using awscli command line tool, run

In Amazon AWS console, you can see the newly created repository by going to “Elastic Container Registry” page in the region where you created the repository. To see the […]

Read More…

Build a docker container with Apache

To create a docker container with Apache, create a Dockerfile

Paste following content into the Dockerfile

Now build an image with command

Once image is build, you can see it using docker images command

To start a container with the image, run

See docker build […]

Read More…

Restart Apache if failed

This bash script check web site every 5 minutes, restart the web server if web site is not responding. Create a file


In above code, replace https://YOUR_DOMAIN.EXTN/ with your sites actual url. Make it executable

Create a cronjob


See Server Monitoring […]

Read More…

CloudPanel – Free Hosting Control Panel Debian 10/Nginx

CloudPanel Hosting Control Panel

CloudPanel is a free hosting control panel, that make deploying web application on cloud easier. It use Nginx web server, support multile PHP versions, comes with nginx configuration for various popular CMS and web applications. Install CloudPanel CloudPanel need a server with Debian 10. To install CloudPanel, run

After install you can access […]

Read More…

Redirect a site to www using PHP

To redirect a site to url with www using PHP, you can use following PHP code

Add this code in your index.php file or another file included by index.php See Redirect […]

Read More…

Repair MySQL database with mysqlcheck


To check and repair all databases in a database run

Forcefully optimize all tables, automatically fixing table errors that may come up.

To check all databases

To analyze all tables in all databases:

To repair all tables in all databases:

To optimize all tables in all databases:

See MySQL […]

Read More…