Archive for the ‘Web Dev’ Category

Colocation Specs: Bandwidth, server factor, Ip subnets

September 15, 2011 Leave a comment


A 10Mbps connection relates to approximately 3.3 Terabytes of bandwidth monthly.

Burstable connections,  normally measured on the 95th percentile.

To determine estimated monthly bandwidth for your site, first determine the page size for each page of your website, then estimate how many daily pageviews you project for each. Simply multiply to estimate monthly bandwidth forecasted, allowing for some overhead.

Rack Space

1U = 1.75″ of Vertical Rack Space

2U = 3.5″ of Vertical Rack Space

3U = 5.25″ of Vertical Rack Space

4U = 7.00″ of Vertical Rack Space.

IP Subnets

/30…..4 IP’s – 2 useable

/29…..8 IP’s – 6 useable

/28…..16 IP’s

/27…..32 IP’s

/26…..64 IP’s

/25…..128 IP’s

/24…..256 IP’s

/23…..512 IP’s

/22…..1024 IP’s

/21…..2048 IP’s

/20…..4096 IP’s

Categories: Web Dev Tags: , ,

Relaying Postfix SMTP via

February 4, 2011 Leave a comment

Install the required packages

sudo aptitude install postfix libsasl2 ca-certificate libsasl2-modules

Configure Postfix

This tutorial will not outline how to configure your postfix server, but we’ll jump directly to the relayhost section.  You’ll want to add the following lines to your /etc/postfix/ file:

relayhost = []:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes

The above lines are telling Postfix that you want to relay mail through gmail on a specific port, telling it to authenticate, and where to find the username and password.  The last three lines specify the authentication types supported, where the certificate authority file is and that it should use tls.

Define Username and Password

Next we’ll need to populate the sasl_passwd file.  Create the file /etc/postfix/sasl_passwd with the following contents:

[]:587      (If you have customized domain just replace by @yourdomain)

This file should have restrictive permissions and then needs to be translated into a .db that Postfix will read.

sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd

At this point you can restart Postfix and it should work, however it will complain about not being able to authenticate the certificate.  To take care of this issue we’ll use the ca-certificate package we installed and tell it where it can validate the certificate.

cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem

Go ahead and reload postfix (sudo /etc/init.d/postfix reload) .



Categories: Linux, Web Dev

Make a Sitemap for Search Engines

February 4, 2011 Leave a comment

add following line to your robots.txt


Create a Sitemap File

A sitemap file that follows the Sitemap Protocol is just a straightforward ASCII text file. You can create it using any ordinary ASCII text editor. If you use Windows, Notepad (found in the Accessories folder of your Start menu) can be used. Do not use a word processor like Microsoft Office or Word.

By way of example, take a look at the following .
Example file:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="">

Place two files onto the root directory of your web host.

Categories: Web Dev