Redirect domains without www (e.g. to with apache rewrite rules

Apache www redirect rule

If all your visitors shall access your website with a URL like and not without www, use the following apache rewrite rule for redirecting them. RewriteEngine On RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}$1 [L,R] The apache rewrite rule can be added in a .htaccess file in the website root directory or if you use ... Read more

How to Backup/Clear/Restore a SpamAssassin Bayes Database

SpamAssassin Bayes Database

Sometimes you might have to work with the Spamassin Bayes Token database. This is the database that is used by the SpamAssassin Self Learning (Bayesian) Classifier to store the ham and spam tokens. This tutorial will show you how to make a backup of that database. E.g. when you want to move it to a ... Read more

[SOLVED] E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

You get the following error message while installing a .deb package on Debian or Ubuntu or while installing Updates? E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? This error means that there is already an apt process running or ... Read more

How To Check And Repair All MySQL Databases on Debian And Ubuntu Linux

The Following command can be used to check and repair all MySQL databases on a Ubuntu or Debian Linux System. Ubuntu Linux sudo mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases Debian Linux mysqlcheck --defaults-file=/etc/mysql/debian.cnf --auto-repair --optimize --all-databases The benefit of the above command is that it uses the debian-sys-maint login to MySQL which is available on every ... Read more

How to Copy Files with SCP between Linux Servers

1.1 SCP Command Line-An Overview


The SCP command line is commonly used to copy files over SSH, and between popular Operating systems like Linux, Mac and Windows in a secure fashion. SCP is used to copy files to/from a remote server. It also allows you to copy files from one remote server to another remote server, without passing traffic through your PC.

Read more