AKZN Notes

Archives for My Lazy and Forgetful Mind

Category: LAMP

HTTP Basic Authentication to secure phpMyAdmin

HTTP Authentication is a method of securing web resources by requiring users to provide valid credentials before accessing them. It operates at the HTTP protocol level and can be implemented using several authentication schemes. One common method for HTTP Authentication is Basic Authentication, which prompts users to enter their username and password in a dialog […]

Importing MySQL Gzipped Dump File via Terminal

Importing MySQL Gzipped Dump File via Terminal When dealing with MySQL databases, it’s common to export and import data for various reasons, such as backups or transferring data between environments. In this concise guide, we’ll focus on importing a gzipped MySQL dump file using the terminal on a system running Ubuntu. Step 1: Navigate to […]

Run two PHP version on same server

Below is a simple Markdown tutorial for configuring Apache to run two PHP versions (PHP 7.4 and PHP 8.0) concurrently using PHP-FPM. This assumes you’re using a Linux system with Apache. Running Multiple PHP Versions with Apache and PHP-FPM before starting, check if we already has two php version sudo update-alternatives –display php Prerequisites Linux […]

Install Server Stack to Armbian for CVCMA

This article is my notes for step by step to install and configure set top box Armbian into kiosk device. List of Bugs browser failed to launch immediately solution : add sleep 60 before launching the browser display need to restart or reattach the hdmi cable if system rebooted. solution: use xrandr to relaunch the […]

How to backup and restore all mysql database from vps

how to backup all database To backup all MySQL data, you can follow these steps: Connect to your VPS: Log in to your VPS using SSH. Navigate to the MySQL data directory: MySQL data files are typically located in the /var/lib/mysql directory. Navigate to this directory by running the following command: cd /var/lib/mysql Create a […]

Codeigniter 3 with php 8.1

How to update your ci 3 version to 3.1.13 change config $config['sess_save_path'] = sys_get_temp_dir() add #[\ReturnTypeWillChange] before the open, read, write, close, destroy and gc functions in /system/libraries/Session/drivers/Session_files_driver.php example : #[\ReturnTypeWillChange] public function open($save_path, $name) { … update system/libraries/pagination.php line 526 from if ( ! ctype_digit($this->cur_page) OR ($this->use_page_numbers && (int) $this->cur_page === 0)) to if […]

WordPress Installation and Migration

Force HTTPS Using htaccess on WordPress Step 1: Update your general settings. Log into your WordPress dashboard ang go to Settings > General. Scroll down to the WordPress and Site URL Address field and replace the HTTP with HTTPS. Click the Save Changes button at the bottom of the page. You’ll be automatically logged out […]

Alpine Linux LAMP Installation Notes

Apache2 .htacess : makesure AllowOverride All on directory htdocs on httpd.conf PHP make sure all module installed Session : make sure session.save_path on php.ini is enabled SSL Letsencrypt make sure apache-ssl module installed sudo apk update & sudo apk upgrade & sudo apk add apache2-ssl sudo apk add certbot-apache sudo certbot certonly make site-avalaible conf […]

How To Secure Apache with Let’s Encrypt on Ubuntu 20.04

source : https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04 Introduction Let’s Encrypt is a Certificate Authority (CA) that facilitates obtaining and installing free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. It simplifies the process by providing a software client, Certbot, that attempts to automate most (if not all) of the required steps. Currently, the entire process of obtaining and […]

Deploy Laravel Project to Hosting or VPS

Deploy to CPanel Clone git to cpanel Taken from https://dashboard.webhostingmagic.com/knowledgebase/242/How-To-Clone-A-Private-Github-Repo-To-A-cPanel-Server.html Git private repository requires SSH access. So you must ensure that your hosting package has SSH enabled (customers on Web Hosting Magic need not worry as every hosting package comes with SSH access) and perform additional steps in order to successfully clone a privately-hosted remote […]