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
Install NVM / Node for all users including Jenkins

Install NVM / Node for all users including Jenkins

Node Version Manager (NVM) is normally installed for a single user, typically under ~/.nvm. This works well for development environments, but it can become problematic on servers where multiple users or services need Node.js. For example, on an Ubuntu server you may need Node.js for: Jenkins CI/CD jobs Supervisor-managed applications www-data Deployment scripts Regular SSH users A better approach for this scenario is to install NVM in a shared system location such as /opt/nvm....

July 16, 2023 · 5 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
Setup Jenkins on Ubuntu 20.04 / 22.04 and run Jobs are root user

Setup Jenkins on Ubuntu 20.04 / 22.04 and run Jobs are root user

Requirements Add the repository key to the system and append the Debian package repository. wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo apt-key add - sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' sudo apt update Install Java 17 sudo apt install openjdk-17-jre-headless Update JAVA_HOME in .bashrc : nano ~/.bashrc export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 Install Jenkins sudo apt install jenkins Allow firewall for 8080 port...

June 10, 2023 · 3 min · Ganesh Bhosale
Secure WordPress Websites from Brute Force Attacks using Fail2ban on LAMP Server

Secure WordPress Websites from Brute Force Attacks using Fail2ban on LAMP Server

You must be here because your Self-Hosted server suddenly reports 100% CPU Utilization and making all server websites slow. There are lot of hackers who use brute-force attack on websites to gain access of it. Let’s start with list of defences: 1. Using different username apart from admin Make Hackers Job More Difficult by choosing Site Specific Usernames 2. Use difficult Passwords with Alphanumerics along with spcial charactors like % # * 3....

September 13, 2021 · 3 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 setup Nginx Server on Ubuntu

How to setup Nginx Server on Ubuntu

How to Set Up an Nginx Server on Ubuntu Nginx is one of the most popular web servers for hosting websites and web applications. It is lightweight, fast, and commonly used as a reverse proxy, load balancer, and web server. In this guide, we will set up Nginx on an Ubuntu server and configure it to serve a website. Prerequisites You should have: An Ubuntu server SSH access to the server A user with sudo privileges A domain name pointing to the server’s IP address For this example, we will use:...

November 21, 2019 · 6 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
Getting started with Cloud Commander – Best File Manager for your VPS

Getting started with Cloud Commander – Best File Manager for your VPS

sudo apt-get install npm npm i cloudcmd -g Create Configuration: sudo nano ~/.cloudcmd.json Put Content { "name": "", "auth": true, "username": "root", "password": "", "algo": "SHA1", "editor": "edward", "packer": "zip", "diff": true, "zip": true, "buffer": true, "dirStorage": true, "online": true, "open": false, "oneFilePanel": false, "keysPanel": true, "port": 8000, "ip": null, "root": "/var/www", "prefix": "", "progress": true, "confirmCopy": true, "confirmMove": true, "showConfig": false, "showFileName": true, "contact": true, "configDialog": true, "console": true, "syncConsolePath": false, "terminal": false, "terminalPath": "", "terminalCommand": "", "terminalAutoRestart": true, "vim": false, "columns": "name-size-date-owner-mode", "export": false, "exportToken": "root", "import": false, "import-url": "http://localhost:8000", "importToken": "root", "importListen": false, "log": true } Put Password:...