Dreamhost Review

By abhishek | Sat, 10/17/2009 - 12:22

Well its been 10 months since i am using dreamhost its quite early to write up a review but still i would like to share , thanks to Amit Singh, Aman Jain and  Rohit Srivastav for recommending me dreamhost, the experience so far have been satisfactory i cannot say that there was no downtime, actually i have seen a lot of them :) still i am happy with it.

There have been instances when my hosting was altogether shifted by the support team to a different server to resolve issues, the support is excellent, the hosting plan in itself is good at least for shared hosters you get everything unlimited i.e. u can host unlimited website i currently host a dozen of them, and yes the One Click Installs are amazing, The affiliate programme is amazing i paid for first year of hosting and already i have earned much to pay for my next few years of hosting with them

I am using shared hosting since 10 years now tried different hosting providers but liked dreamhost so if you are planning to get a shared hosting i would recommend you Dreamhost, and yes you also get a domain free when registering for Hosting Plans.

I recommend the L1 Yearly plan of dreamhost if you are really interested use this link to register and get a $50 discount :)

Why should one go with Dreamhost ?

Suggestion

If you are hosting multiple sites don't host them with a single account. create different accounts for each site after all u have unlimited accounts in ur plan.

I would also like to share some of the emails from support


These guys moved me to a new server

Hello,

On Wed, 30 Sep 2009, you wrote:

> > Hi Team,
> >
> > Thankx for moving me to a new server tough i would like to know why i
> > was moved, was i consuming lot of resources if yes do let me know so
> > that i can optimize a bit

    Nope, that wasn't it. We're just doing a bit of upgrading and
restructuring on our end. You can read all about it here:

http://wiki.dreamhost.com/Server_Moves#Why_do_servers_change.3F

If there's anything else we can do for you, please let us know.

Thanks!
Dan W

Why did u try to restore when i never wanted it

> What do you mean by you are unable to restore my website i never requested
> > to do so.

Sorry about that. Another representative was working on this for you and
mistakenly tried to restore your website. You may disregard this.

Write back if I can do anything else for you.

Thanks!
Mike S

Funny

so far the experience is good

I recommend Dreamhost for your hosting

What to expect from Drupal Sprint India 2009

By abhishek | Sun, 10/04/2009 - 22:43

A formal announcement for Drupal Sprint India 2009 was already done last month and is available here!!

I am very sure that now you would be very curious to know what is it all about so this post might clear some of your confusion.

Whats in Drupal Sprint India 2009

Hey, this event is for YOUUUUUUUUU !!!

Why should i attend ??

a) If you are a newbie

  • You will get a chance to learn something very dynamic.
  • You will get a chance to know Drupal which is one of the best opensource Content Management System ever created.
  • You will get an opportunity to build up network with Drupal Geeks from India and abroad.
  • You will get an opportunity to be contribute to Drupal in various forms.

b) If you are a Drupaler

  • You can showcase your skills via talks/workshops.
  • You can help in Bug Fixing
  • You can help in Documenting Drupal
  • You can help in Localizing Drupal
  • You will meet Drupal enthusiasts from all over India and across

 IFFFFFFFFFF you are unable to make it to pune this time.

so what are you waiting for register under various categories in Drupal Sprint India by visiting http://drupalindia2009.plug.org.in/

 

Where .deb files are stored in Ubuntu ?

By abhishek | Fri, 10/02/2009 - 18:09

We always hear people saying ubuntu works well only when you have a strong internet connection as the Install CD doesn't contain all the packages required agreed now a CD cannot contain all the packages you require so you need to download the packages but there is a clear misunderstanding among new users that they always need to download these packages, Its essential to download them once but if you are reinstalling ubuntu on new machine you need not download these packages all over again if you have installed required packages on one of the machine you can use the content of below listed directory for installation

/var/cache/apt/archives

this directory contains the debian packages download by the apt-get :)

so have fun reuse the content for each install and save time and bandwidth

Search Engine Optimization using 301 Redirects

By abhishek | Thu, 09/17/2009 - 21:12

Search Engine Optimizations, i am very sure that all would have heard this term by now, in simple terms its a process of "making your website Search Engine friendly" there are various ways methods to do this, let me be very clear there is no specific way by which you can have a perfectly optimized website, in this post i discuss one of the methods by which you can remove the confusion of a search engine :).

Confused Search Engine !!! yes this happens often, just because of a silly mistake done unknowingly. Search engine often gets confused due to the links for example http://www.example.com and http://example.com may open same website but they are 2 different links and hence there are chances that both of them gets listed on search engines which is not what you will want to happen how to solve this problem ?

And i have a one line answer to this "by using 301 redirects" or "URL Redirections" below is the process by which you can implement this on various types of websites

For Websites hosted on Linux Servers

Edit .htaccess present in web root and add the following lines

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]

This will redirect requests for example.com to www.example.com ensure you have mod_rewrite enabled.

For Websites hosted on IIS use the following steps

  • In internet services manager, right click on the file or folder you wish to redirect
  • Select the radio titled "a redirection to a URL".
  • Enter the redirection page
  • Check "The exact url entered above" and the "A permanent redirection for this resource"
  • Click on 'Apply'

Just in case you don't have control on the server as if you are on a shared hosting which does not provide any such service you can also programatically  redirect below are the code for PHP and ASP similar kind of code is applicable for others

For PHP

<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.example.com" );
?>

For ASP

<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.example.com/"
%>

Hosting a Website from Local Machine

By abhishek | Sat, 08/29/2009 - 23:20

I am sure you would have thought atleast once of hosting your website from your machine itself, if not the website atleast a sandbox version of it as it would be comparatively easy for you to maintain it so i discuss the steps you need to follow to achieve this, first lets go through the requirements, in this post i am talking about small sized sites a minor modified version of this post is applicable for large sites as well.

Requirements

1) A really broad Internet Connection.
2) A Static IP
3) A High End Machine (if the site you are hosting is pretty static a lower end machine is sufficient to be more clear a dynamic personal blog kind of site will also never need more than 1000 Mb of RAM unless you are the Top blogger of the country)
4) Server Software (Apache preferred)
5) A Database Server (if needed, mysql/postgresql recommended)
6) Scripting Support (might be PHP. perl, python as per the requirements)

In simple words your local LAMP machine can work as the server for your website :)

I have the machine ready with a good internet connection and a static IP Now what

Hey you are almost done just a few entries here and there and you host the website from your home

Now you will need to resolve your domain to your IP address, now whats it and how will i do this

Its quite simple you need to add an entry in DNS so that it can resolve this, request your registrar to do this for you if you are unable to do this, generally you would be able to do this at no additional costs, in simple terms if you have registered a domain say example.com and your static IP is x.x.x.x then example.com should resolve to x.x.x.x thats it.

Once the above step is done and are planning to host only one website then your setup is ready :) if you need to host more than one domains on this single machine just add virtual hosts in your server configuration for each of the domains and make all domains pointing to same IP.

What else you will have to do ?

Keep this machine up 24x7 after all you will not like your site to be down

 

Also dedicate the machine as server dont try playing games on it, its a server now and putting extra load to it will slow down your site performance

I would warn hosting a server is not that easy as it looks like security issues can pop up now and then and you should be technically sound to handle this so its recommended spending some amount and  take a hosting plan from someone in the business after all he is there for providing you services.

Key Based Authorization with SSH

By abhishek | Wed, 08/26/2009 - 19:09

Using remote shells is all time favourite but remembering those many passwords is a pain so here are the steps to login using SSH without putting a password :)

 

1. Create a public ssh key, if you haven’t one already. Look at ~/.ssh. If you see a file named id_dsa.pub then you obviously already have a public key. If not, simply create one.

ssh-keygen -t dsa should do the trick. Please note that there are other types of keys, e.g. RSA instead of DSA.

2. Make sure your .ssh dir is not publically writable

    # chmod 700 ~/.ssh

3. Get your public ssh key on the server you want to login automatically.
   
    #scp ~/.ssh/id_dsa.pub remoteuser@example.com

4. Append the contents of your public key to the ~/.ssh/authorized_keys and remove it.

Important: This must be done on the server you just copied your public key to. Otherwise you wouldn’t have had to copy it on your server. Simply issue something like

 

    # cat id_dsa.pub >> .ssh/authorized_keys while at your home directory.

 

5. Instead of steps 3 and 4, you can issue something like this:
   
    # cat ~/.ssh/id_dsa.pub | ssh -l remoteuser remoteserver.com 'cat >> ~/.ssh/authorized_keys'

   6. Remove your public key from the home directory on the server.

   7. And you are in

    # ssh -l remoteuser example.com
        or
    # ssh remoteuser@example.com

 

 without getting asked for a password.

Drupal Modules you cant live without

By abhishek | Sun, 08/09/2009 - 13:18

Drupal is one of the most flexible Content Management System available and Its been more than 18 months since i am using it and have tried and tested lot many  modules, in this post i try to categorize non core drupal 6 modules on the basis of my experience in must have and enhance your site categories. i am sure this list would change with time

Modules you cant live without

Enhance your site using the below

Configuring Apache with SSL

By abhishek | Fri, 06/12/2009 - 14:47

Apache is the most common web server used now a days, you would have already configured apache many times by now but what about configuring it with SSL i.e. using apache to service on the https protocol, i assume you have already configured the basic apache server and have also enabled the SSL module, if not refer to my previous post on Configuring Apache Web server.

The following post is an extremely simplified step by step guide to configure SSL in apache using Self Signed Certificates you can also use a real certificate issued by a CA if you have it

Prerequisites

1) Apache with SSL module enabled
2) openssl installed

Step 1) Generate a Private Key

We will use the openssl toolkit for generating a RSA Private Key and Certificate Signing Request, as the first step generate the key the command below will create a 1024bit key using 3des

abhishek@kashipur.in:~$ openssl genrsa -des3 -out server.key 1024
Generating RSA private key, 1024 bit long modulus
......................++++++
..................................++++++
unable to write 'random state'
e is 65537 (0x10001)
Enter pass phrase for server.key:
Verifying - Enter pass phrase for server.key:

Step 2) Generate a CSR (Certificate Signing Request)

Once the key is generated you will need to make a CSR or Certificate Signing Request, using the following command you can generate a CSR in this process you would be asked to enter various parameters as shown below

abhishek@kashipur.in:~$ openssl req -new -key server.key -out server.csr

Enter pass phrase for server.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:IN
State or Province Name (full name) [Some-State]:UK
Locality Name (eg, city) []:Kashipur
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Kashipur Networks
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:kashipur.net
Email Address []:abhishek at kashipur dot net

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

Step 3) Remove Pass phrase from Key

This is completely an optional step if you skip this you will have to run to the server as and when the server restarts to enter the pass phase :) , use the following commands to get rid of this problem

abhishek@kashipur.in:~$ cp server.key server.key.org
abhishek@kashipur.in:~$ openssl rsa -in server.key.org -out server.key

Enter pass phrase for server.key.org:
writing RSA key

Step 4) Generating a Self-Signed Certificate

Once you have your Key and CSR ready its time to generate the Certificate use the following command to generate a certificate

abhishek@kashipur.in:~$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Signature ok
subject=/C=IN/ST=UK/L=Kashipur/O=Kashipur Networks/CN=kashipur.net/emailAddress=abhishek at kashipur dot net
Getting Private key

Step 5) Copy Certificate and Key to Apache Folder

After following the steps above you would have the following files generated

abhishek@kashipur.in:~$ ls -l

-rw-r--r-- 1 abhishek abhishek 952 2009-06-12 14:30 server.crt
-rw-r--r-- 1 abhishek abhishek 704 2009-06-12 14:27 server.csr
-rw-r--r-- 1 abhishek abhishek 887 2009-06-12 14:29 server.key
-rw-r--r-- 1 abhishek abhishek 963 2009-06-12 14:28 server.key.org

Copy the crt and key file to a preferable location inside the apache configuration folder generally /etc/apache2/cert using the following command

abhishek@kashipur.in:~$ cp server.crt server.key /etc/apache2/cert

Step 6) Configure Apache with SSL

Once you have your Certificate and Key copied, modify your httpd.conf to reflect the following

SSLEngine on
SSLCertificateFile /etc/apache2/cert/server.crt
SSLCertificateKeyFile /etc/apache2/cert/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

Ensure apache is listening to Port 443 if not add the Listen Directive. After making these changes preferable verify the configuration file using the following command

abhishek@kashipur.in:~$ apache2ctl configtest
Syntax OK

Once you see Syntax OK you are ready to use https.

Step 7) Restart Apache and test

To apply the configuration changed you need to restart apache which can be done using the following command

root@kashipur.in:~# service apache2 restart

or

root@kashipur.in:~# service httpd restart (in many cases)

Once you restart test it by appending https:// to the URL

Happy HTTPS :)

Configuring BSNL EVDO Modem in Debian GNU/Linux

By abhishek | Thu, 04/30/2009 - 23:16

EVDO DeviceI recently shifted to Debian GNU/Linux (Lenny), and the first task included configuring my Internet Connection, i use BSNL EVDO Modem to connect to the internet which is not recognized my default in Debian so following is the process by which i configured my BSNL EVDO in Debian

Step 1) Checked for Modem, Vendor and Product ID

$ cat /proc/bus/usb/devices

You will find many entires in this just check for your modem entry in my case i found

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=fffe Rev= 0.00
S:  Manufacturer=ZTE, Incorporated
S:  Product=ZTE CDMA Tech

by this i know the following information

Vendor=19d2
ProdID=fffe

Step 2) Detect modem (as root user)

# modprobe usbserial vendor=0x1952 product=0xfffe

Note : appending "0x" before Vendor and ProdID is a must

Step 3) Replug The Modem

Check if its detected using dmesg

# dmesg

[   14.280399] usbcore: registered new interface driver usbserial
[   14.280399] usbserial: USB Serial support registered for generic
[   14.280399] usbserial_generic 1-1:1.0: generic converter detected
[   14.280399] usb 1-1: generic converter now attached to ttyUSB0
[   14.280399] usbserial_generic 1-1:1.1: generic converter detected
[   14.280399] usb 1-1: generic converter now attached to ttyUSB1
[   14.280399] usbserial_generic 1-1:1.2: generic converter detected
[   14.280399] usb 1-1: generic converter now attached to ttyUSB2
[   14.280399] usbserial_generic 1-1:1.3: generic converter detected
[   14.280399] usb 1-1: generic converter now attached to ttyUSB3
[   14.280399] usbcore: registered new interface driver usbserial_generic
[   14.280399] usbserial: USB Serial Driver core

from this you come to know that your modem Device is ttyUSB0

Step 4) Install wvdial

# apt-get install wvdial

Step 5) Configure wvdial

edit the wvidal configuration file (/etc/wvdial.conf) below is my wvdial.conf this should work for you aswell

# gedit /etc/wvdial.com

[Dialer Defaults]
Modem = /dev/ttyUSB0
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Stupid Mode = on
Modem Type = Analog Modem
Phone = #777
ISDN = 0
Username = cdma
Password = cdma
Baud = 9600

Step 6) Connect :)

# wvdial

hey you are now connected.....

Step 7) Adding the Modem Detection @ startup

edit /etc/modules and add the following

usbserial vendor=0x1952 product=0xfffe

# gedit /etc/modules (add the above line)

Notes : wvdial runs as a super user to enable this for normal user you need to edit user permissions.

हिन्दी लोकीकरण योजना

By abhishek | Sun, 04/26/2009 - 10:07

हिन्दी लोकीकरण योजना का पहला अनुवाद पैकेज अब डाउनलोड के
लिये http://drupal.org/project/hi पर उप्लब्ध है !

हिन्दी लोकीकरण योजना
प्रगति की स्थिति

# ४ योगदानकर्ता
# ४८१५ अनुवाद करने के लिए शेष
# ४२३ अनुवाद दर्ज

अब आप भी सुझाव जमा कर स़कते है नीचे दिये लिन्क पर जाकर

हिन्दी सुझाव के लिये
http://drupall10n.com/translate/languages/hi/edit?project=&status=1&sea…