Preview Website Before Name Server Change

When migrating web site to new server, it is good to test the site from new server before you actually change the name servers. Doing this will avoid unexpected errors after you make site live from new server.

To do this, you need to edit file with name hosts on your computer. Add following content to it.


At this point, if you take command promt on you computer and type folloing command, you will see the new server IP.

Now you may need to restart the browser for browser DNS cache to clear. Now you will be able to see the site from new server.

Location of hosts file

Location of hosts file depends on Operating System you use.


You need to edit the file c:\Windows\System32\Drivers\etc\hosts

To open, you need Administrator privilage, so run notepad as user “Administrator”, then open above file to edit it.

Linux and Mac

The file is located in /etc/hosts, to edit use

Visual Code Studio

I was using Sublime Text as my text editor. Recently switched to Visial Code Studio, it is an open source editor from Microsoft, it work on Windows, Linux and Mac. You can download it from

Here are some shortcuts i use

Youtube Clone Script

vShare Youtube Clone Script

vShare Youtube Clone Script allow you to run your own video sharing web site like youtube.

You can get this script from

This script use ffmpeg to convert video into MP4 format, that cna be played using HTML5 or Flash player on browsers and mobile.

Here are some of the video sites using vshare

Nginx Configuration for Video Streaming With Secure Link
vShare Nginx Config
Disable Signup Notification in vShare Youtube Clone

PHP Script to pull changes from GIT Repository

Here is a PHP script, that pull latest code from Git Repository to your web site.