Apache Virtual Hosts on Debian 7

Virtual Hosts are used to run more than one domain off of a single IP address. This is especially useful to people who need to run several sites off of one virtual private server– each will display different information to the visitors, depending on which website the user is accessing.There is no limit to the number of virtual hosts that can be added to a VPS.

Set Up
The steps in this tutorial require the user to have root privileges. You can see how to set that up in the Initial Server Setup. Choose whichever username you fancy.

Additionally, you need to have apache already installed and running on your virtual server. If you haven’t already done so, use the following command:

sudo apt-get install apache2

Continue reading “Apache Virtual Hosts on Debian 7” »

Share

Convert squid timestamps

When you work with a squid access log file you sometimes want to know when a site or resource was accessed. Squid does not store the date and time information for that in a human readable format.

It is stored as <unix timestamp>.<centisecond> so you can use a command like that to post-process to make it more readable for you:

cat access.log | perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e'
Share

Zimbra 8 on Ubuntu 14 with DKIM activation

Step 1 – connect to your server, get root privileges and install this package.

apt-get install libgmp10 libperl5.18 unzip pax sysstat sqlite3 dnsmasq wget

Configure hostname and DNS Server
In this tutorial will use the ‘dnsmasq’ resolving nameserver to speedup DNS lookups in Zimbra. Dnsmask has been installed as prerequisite in the first chapter, so we just have to configure it now:

Step 1 – Edit hostname and hosts Continue reading “Zimbra 8 on Ubuntu 14 with DKIM activation” »

Share

Outlook settings for vestacp

Properly set up a Mail Client in Vesta Control Panel

  • You can use Thunderbird, Apple Mail, Outlook or Outlook Express
  • Use full e-mail address as username
  • IMAP and SMTP STARTTLS with normal passwords

Example Settings:

Username: william.cage@alpha-mimic.ltd
password: aXly8Kbiqo

IMAP hostname: alpha-mimic.ltd
IMAP port: 143
IMAP security: STARTTLS
IMAP auth method: Normal password
SMTP hostname: alpha-mimic.ltd
SMTP port: 587
SMTP security: STARTTLS
SMTP auth method: Normal password

Congratulations, you now have all set up!

Share

Upgrade mysql 5.5 to 5.6 in Ubuntu 14

While I was installing idoit- the cmdb and IT documenting platform, struggling with a pre-requisite of having mysql version 5.6 which is not shipped by native in ubuntu 14 installations. So had to google it and found some solution, however the one that worked for me which I’m sharing below:

step 1 : remove old mysql

sudo apt-get remove mysql-server
sudo apt-get autoremove

step 2 : install new version of mysql

sudo apt-get install mysql-client-5.6 mysql-client-core-5.6
sudo apt-get install mysql-server-5.6
Share

Essential Openvz commands

1. Command to list the running VPSs in a node

# vzlist

Example:

# vzlist
 CTID NPROC STATUS IP_ADDR HOSTNAME
 106 104 running xx.xx.xx.xx server1.test.com 
 107 46 running xx.xx.xx.xx server2.test.com 
 108 83 running xx.xx.xx.xx server3.test.com
 109 86 running xx.xx.xx.xx server4.test.com

2. This command lists all (running and stopped) the VPSs in a node.

# vzlist -a

Example:

# vzlist -a
 CTID NPROC STATUS IP_ADDR HOSTNAME
 106 104 running xx.xx.xx.xx server1.test1.com 
 107 46 running xx.xx.xx.xx server2.test2.com 
 108 83 running xx.xx.xx.xx server3.test3.com
 109 86 running xx.xx.xx.xx server4.test4.com
 110 - stopped xx.xx.xx.xx server5.test5.com

Continue reading “Essential Openvz commands” »

Share

ZOHO Mail Client Configuration

Zoho Mail can be accessed via POP/ IMAP from the standard email clients. The administrator can enable or disable the access via POP/ IMAP for the user accounts based on the organizations requirements. The POP/ IMAP configuaration details are given below:

IMAP
Incoming Server Name : imappro.zoho.com
Port : 993
Require SSL : Yes
Username : you@yourdomain.com

POP
Incoming Server Name : poppro.zoho.com
Port : 995
Require SSL : Yes
Username : you@yourdomain.com

Outgoing / SMTP
Outgoing Server Name: smtp.zoho.com
Port : 465 with SSL or 587 with TLS
Require Authentication: Yes

Share

Creating Nginx Virtual Hosts

Step One— Create a New Directory

The first step in creating a virtual host is to a create a directory where we will keep the new website’s information. This location will be your Document Root in the nginx virtual configuration file later on. By adding a -p to the line of code, the command automatically generates all the parents for the new directory.

sudo mkdir -p /var/www/example.com/public_html

You will need to designate an actual DNS approved domain, or an IP address, to test that a virtual host is working. In this tutorial we will use example.com as a placeholder for a correct domain name.

However, should you want to use an unapproved domain name to test the process you will find information on how to make it work on your local computer in Step Six.

Step Two—Grant Permissions

We need to grant ownership of the directory to the right user, instead of just keeping it on the root system. You can replace the “www-data” below with the appropriate username.

sudo chown -R www-data:www-data /var/www/example.com/public_html

Additionally, it is important to make sure that everyone is able to read our new files.

sudo chmod 755 /var/www

Now you are all done with permissions. Continue reading “Creating Nginx Virtual Hosts” »

Share