Enable GZIP Compression on Ubuntu + Apache

Enable GZIP Compression on Ubuntu + Apache

Enable GZIP Compression on Ubuntu + Apache GZIP compression is a technique used to reduce the size of files transmitted over the internet, which can significantly improve website performance and decrease load times. In this article, we will guide you through the steps to enable GZIP compression on an Ubuntu server with Apache. Step 1: Check if mod_deflate is installed Before proceeding, we need to check if the mod_deflate module is installed and enabled in Apache....

August 3, 2023 · 2 min · Ganesh Bhosale
How to Run a Root-Level Shell Script in Jenkins

How to Run a Root-Level Shell Script in Jenkins

Jenkins normally runs shell commands as the jenkins user. However, some server-maintenance tasks require root privileges—for example, cleaning APT caches, removing old packages, or managing system files. A common but unsafe approach is to give the Jenkins user unrestricted sudo access: jenkins ALL=(ALL) NOPASSWD: ALL This allows Jenkins jobs to execute arbitrary commands as root. A much safer approach is to allow Jenkins to run only one specific maintenance script as root....

June 12, 2023 · 4 min · Ganesh Bhosale
Manage Laravel Queues using Supervisor

Manage Laravel Queues using Supervisor

Every Laravel Queue has it’s own cached version of Laravel Models, Jobs & Notification. You will be in serious panic if you are working on Jobs & Notification as Queue will not update the version of those file dynamically. You will need to restart Queue every time, by finding it in processes and killing it. Supervisor is a client/server system that allows its users to control a number of processes on UNIX-like operating systems....

November 7, 2021 · 1 min · Ganesh Bhosale
Ubuntu: Keep Process running in background using Tmux

Ubuntu: Keep Process running in background using Tmux

There are sometimes requirement on server side to keep background process from terminating. Follow following article to achieve it using tmux. ssh into the remote machine Start tmux by typing tmux into the shell Start the process you want inside tmux session. In this I will be running Cloud Commander cloudcmd. cloudcmd Leave / Detach the tmux session by typing Ctrl+b and then d. List all tmux sessions by tmux list-sessions Attach / Resume to a running session with...

May 14, 2021 · 1 min · Ganesh Bhosale
Complete guide - LetsEncrypt Certbot SSL for Ubuntu

Complete guide - LetsEncrypt Certbot SSL for Ubuntu

Let’s Encrypt provides free, automated SSL/TLS certificates that can be used to enable HTTPS on an Ubuntu server. Certbot is one of the most popular tools for obtaining and automatically renewing Let’s Encrypt certificates. This guide covers installing Certbot, configuring SSL for Apache and Nginx, testing HTTPS, automatic renewal, and common troubleshooting commands. Prerequisites Before installing Certbot, make sure: You have an Ubuntu server. You have sudo or root access. Your domain points to the server’s public IP address....

June 11, 2020 · 8 min · Ganesh Bhosale
How to switch PHP Versions on LAMP Server

How to switch PHP Versions on LAMP Server

Use multiple PHP versions on same server and manage currently running (default) php version for terminal. Install multiple PHP Versions: sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php8.1 sudo apt-get install php8.4 sudo a2enmod php8.1 sudo a2enmod php8.4 Switch: sudo update-alternatives --config php

January 13, 2019 · 1 min · Ganesh Bhosale
Laravel Task Scheduling in Ubuntu using Cron Tabs

Laravel Task Scheduling in Ubuntu using Cron Tabs vs Supervisor

Laravel provides a convenient way to define scheduled tasks using its task scheduler. Instead of creating a separate Linux cron entry for every Laravel command, you can define your scheduled tasks inside the Laravel application and let Laravel handle when each task should run. On Ubuntu, the most common approach is to use CronTab to execute Laravel’s schedule:run command every minute. This article focuses on two practical ways to run Laravel’s scheduler:...