Web

Setting up an SSL server with Apache2 on Debian

With the introduction of the Apache2 packages in Debian it is much simpler to create and use a secure SSL protected webserver than in the old days with Apache 1.3, here we’ll show how it is done. If you have Apache 2.x installed already then you’re good to go as you don’t need anything extra […]

Read More
Linux

How to configure postfix virtual domains

I will assume that your postfix configuration directory is /etc/postfix and your postfix version is around 2.0.14 1. Edit /etc/postfix/virtual This is a plaintext file where you can specify the domains and users to accept mail for. Each virtual domain should begin with a single line containing the domain name. The subsequent lines define addresses […]

Read More
Scripting

Script to backup MySql database

#!/bin/bash # Shell script to backup MySql database # To backup Nysql databases file to /backup dir and later pick up by your # script. You can skip few databases from backup too. MyUSER=”SET-MYSQL-USER-NAME” # USERNAME MyPASS=”SET-PASSWORD” # PASSWORD MyHOST=”localhost” # Hostname # Linux bin paths, change this if it can’t be autodetected via which […]

Read More
Scripting

Find domain expiration date

To get expiration date use grep command: $ whois nixcraft.com | egrep -i ‘Expiration|Expires on’ Output: Expiration Date: 10-may-2009 NOTICE: The expiration date displayed in this record is the date the currently set to expire. This date does not necessarily reflect the expiration view the registrar’s reported date of expiration for this registration. Expires on: […]

Read More
Scripting

Debug a bash shell script

Shell scripting debugging can be boring job (read as not easy). There are various ways to debug a shell script. Method # 1: Use -x option Run a shell script with -x option. $ bash -x script-name $ bash -x domains.sh Method # 2: Use of set builtin command Bash shell offers debugging options which […]

Read More