Get a list of all virtual hosts which are defined in all apache configuration files

Have you ever looked in the apache config files to see where a website's virtual host is defined? The apache2ctl script has a useful option that could come in good here. When you execute the command, it should look like this: apache2ctl -S You'll obtain a list of all virtual hosts and default servers in ... Read more

How to download and extract a .deb package on Ubuntu or Debian Linux

Download .deb package

Sometimes you require a certain file from a Debian .deb package. For example, because you accidentally deleted a file. Or because the package's installation is faulty and it can't be restored without first adding the missing file. This FAQ explains how to extract the contents of a.deb file downloaded from the Debian or Ubuntu repository. ... Read more

Reduce CPU and Disk load of backup scripts with nice and ionice

Reduce CPU and Disk Load on Linux

Running a nightly backup script on a server system, such as a web hosting server, can result in a heavy load and longer latency for other processes, for example, HTML or .php pages load slowly during the backup because the backup script requires too many I/O or CPU resources. On Linux systems, two shell utilities ... Read more

Check and Repair All MySQL Databases on Ubuntu

MySQL Optimize and Repair

The following command can be used to check and repair all MySQL databases on a Ubuntu or Debian Linux System. I've tested the commands on Ubuntu 20.04 and Debian 10. Repair MySQL databases on Ubuntu Linux sudo mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases MySQL database repair on Debian mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases The benefit of ... Read more