Invalid command Header

On a web site running Apache, i got following error in log file

[Fri Jan 19 06:43:41.146643 2018] [core:alert] [pid 3536:tid 139697024132864] [client] /home/ Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer:

This was Ubuntu server with Apache.

Problem is due to Apache Headers module not enabled. Fixed by running

a2enmod headers

Restart Apache

systemctl restart apache2

See Apache

Install PHP 5.6 on Debian

Debian 9 come with PHP 7. To install PHP 5.6, run

Install PHP 5.6 with

Enable SimpleXML module

Install php-fpm if required

See php

OVH VPS Configure failover IP in Ubuntu

On Ubuntu

Default config look like

/etc/network/interfaces.d/50-cloud-init.cfg is used to auto configure network interface with dhcp.

First find the gateway used by the VPS.

We found the gateway IP

The VPS had main IP of the server is and secondary IPS,,

Here is the modified /etc/network/interfaces

Here is a PHP script to create OVH failover IP config for Ubuntu/Debian.


ufw is firewall in Ubuntu.

To enable

To list available apps, run

To see status, run

Stop ufw

Start ufw

Open Ports

Here are some commands to open ports.

Following command open tcp ports 8000 to 9000.

apt error after MariaDB to MySQL change

I have install MariaDB on a Ubuntu 16.04 server. Then installed Virtualmin, that require MySQL, so it removed MariaDB and installed MySQL, this caused apt stop working.

When i run “apt update”, it failed with

Next i run ‘apt-get -f install’ as it said in above error message.

That too failed. The error message is

Preparing to unpack …/mysql-server-5.7_5.7.20-0ubuntu0.16.04.1_amd64.deb …
Aborting downgrade from (at least) 10.0 to 5.7.

This is because MySQL detected MairaDB data files in /var/lib/mysql folder, it can’t use same data files as MariaDB is newer version.

To fix the problem, i renamed the folder

Now running “apt-get -f install” fixed the problem with apt.

apt show

apt show command shows information about a package.

See apt policy apt

apt policy

apt policy command show information about a package.

It shows the installed version “Installed: 2.4.18-2ubuntu3.5” and the repo from where it is installed.

See apt


Auto backup all your MySQL databases daily, weekly and monthly.

To install on Debian/Ubuntu, run

To manually backup, run

MySQL backups will be stored in folder

See backup

subprocess installed post-installation script returned error

When installing software on Ubuntu, i get following error.

To fix this, run

Replace PACKAGE_NAME_HERE with actual package that fail. In this cause spl-dkms.

See apt


To change vi editor run

To display current vi config, run