<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Discussion Delegate</title>
	
	<link>http://vxtindia.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 05 Jan 2012 10:36:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TheDiscussionDelegate" /><feedburner:info uri="thediscussiondelegate" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Rackspace vs Prgmr</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/WO38Ow8ireQ/</link>
		<comments>http://vxtindia.com/blog/rackspace-vs-prgmr/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 10:34:50 +0000</pubDate>
		<dc:creator>Sudhanshu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=279</guid>
		<description><![CDATA[We have been working on a couple of our own applications, and since they do involve a server side components as well, we decided to spend some time to understand which service should we go ahead with. I have been been a big fan of Slicehost for years, and when they got acquired by Rackspace, [...]]]></description>
			<content:encoded><![CDATA[<p>We have been working on a couple of our own applications, and since they do involve a server side components as well, we decided to spend some time to understand which service should we go ahead with.</p>
<p>I have been been a big fan of <a href="http://slicehost.com" target="_blank">Slicehost</a> for years, and when they got acquired by <a href="http://rackspacecloud.com" target="_blank">Rackspace</a>, we decided to move there as well. Not to say that we haven&#8217;t spent time with other services. We suggest <a href="http://linode.com" target="_blank">Linode</a> to a lot of our clients, so we have done decent amount of work with that as well. However, <a href="http://prgmr.com" target="_blank">Prgmr</a> and <a href="http://rackspacecloud.com" target="_blank">Rackspace</a> are two of my favorites and I wanted to find out which one of them works better.</p>
<p>We deviced a simple test. Since we were going to run the site on a really <a href="http://lowendbox.com" target="_blank">low end box</a> with Apache and PHP (no nginx for now), we decided to put up two really small servers, configure Apache, and track the average response time that we were getting.</p>
<p>It looks a little over 2 hours to come out with the results and here is what we saw</p>
<p><b><span style='color: blue;'>Blue</span> is RackspaceCloud and <span style='color: red;'>Red</span> is Prgmr.com</b></p>
<p><a href="http://vxtindia.com/blog/wp-content/uploads/2012/01/Screen-Shot-2012-01-05-at-3.18.54-PM.png"><img src="http://vxtindia.com/blog/wp-content/uploads/2012/01/Screen-Shot-2012-01-05-at-3.18.54-PM.png" alt="" title="Screen Shot 2012-01-05 at 3.18.54 PM" width="576" height="436" class="aligncenter size-full wp-image-280" /></a></p>
<blockquote><p>In this screenshot, we have we have reduced the scale of the Y-axis to 5 seconds. As you can see Prgmr.com was slightly slower, but must more consistent.</p></blockquote>
<p><a href="http://vxtindia.com/blog/wp-content/uploads/2012/01/Screen-Shot-2012-01-05-at-3.19.33-PM.png"><img src="http://vxtindia.com/blog/wp-content/uploads/2012/01/Screen-Shot-2012-01-05-at-3.19.33-PM.png" alt="" title="Screen Shot 2012-01-05 at 3.19.33 PM" width="575" height="436" class="aligncenter size-full wp-image-281" /></a></p>
<blockquote><p>You can see here that Rackspace almost forgets to respond at times</p></blockquote>
<p>Another point to note is that the <a href="http://prgmr.com" target="_blank">Prgmr.com</a> server has 256MB of RAM while the <a href="http://rackspacecloud.com" target="_blank">Rackspace server</a> has 512MB of RAM. So on the whole, if you&#8217;re looking for a small VPS to help start your website, I would suggest moving ahead with <a href="http://prgmr.com" target="_blank">Prgmr.com</a>.</p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=279&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/WO38Ow8ireQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/rackspace-vs-prgmr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/rackspace-vs-prgmr/</feedburner:origLink></item>
		<item>
		<title>Augmented Reality App for Zomato</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/uiq2qGA-HVM/</link>
		<comments>http://vxtindia.com/blog/augmented-reality-app-for-zomato/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 11:13:34 +0000</pubDate>
		<dc:creator>Sudhanshu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Augmented Reality]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[vxtindia]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=262</guid>
		<description><![CDATA[It is only once in a while that an interesting company comes up here in India AND they give you an API to play around. This is why we jumped with joy when we saw that Zomato had come out with a really cool API. Sadly, due to a huge influx of client projects, we [...]]]></description>
			<content:encoded><![CDATA[<p>It is only once in a while that an interesting company comes up here in India AND they give you an API to play around. This is why we jumped with joy when we saw that <a href="http://zomato.com" target="_blank">Zomato</a> had come out with <a href="http://www.zomato.com/blog/launching-the-zomato-api-key-learnings/" target="_blank">a really cool API</a>. Sadly, due to a huge influx of client projects, we were never able to spend any time on it.</p>
<p>Earlier this month, we decided to build something with the Zomato API; and since we were going to pitch for an augmented reality project in February, we thought it would be a good idea to build an app which shows you a world filled with restaurants and if you should go there or not.</p>
<p>I shouted on Twitter on the <a href="http://twitter.com/#!/sudhanshuraheja/status/147559858953142273" target="_blank">16th</a> saying that we were going to do a one day app, but once we started, we realized that we really couldn&#8217;t do justice to it if we were going to spend just a couple of days on it. Unlike big companies, we just needed a quick <i>chai</i> break to convince everybody that this had to be done, and we decided to spend a good two weeks on it.</p>
<p>Things have been moving as quickly as possible and I am now in a position to showcase some of the designs that we have created, which are currently being integrated. (Eventually, it will include things as described in zomato&#8217;s terms of service.)</p>
<p>So, here are the initial mockups. We look forward to get some interesting comments!</p>
<p><a href="http://vxtindia.com/blog/wp-content/uploads/2011/12/splash_screen.png"><img src="http://vxtindia.com/blog/wp-content/uploads/2011/12/splash_screen.png" alt="" title="splash_screen" width="640" height="960" class="alignleft size-full wp-image-263" /></a></p>
<p><a href="http://vxtindia.com/blog/wp-content/uploads/2011/12/detail_view.png"><img src="http://vxtindia.com/blog/wp-content/uploads/2011/12/detail_view.png" alt="" title="detail_view" width="640" height="960" class="alignleft size-full wp-image-264" /></a></p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=262&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/uiq2qGA-HVM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/augmented-reality-app-for-zomato/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/augmented-reality-app-for-zomato/</feedburner:origLink></item>
		<item>
		<title>Here’s to the crazy ones</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/thNyLKYq5vQ/</link>
		<comments>http://vxtindia.com/blog/heres-to-the-crazy-ones/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 16:26:15 +0000</pubDate>
		<dc:creator>Sudhanshu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=255</guid>
		<description><![CDATA[Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes. The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo. You can quote them, disagree with them, glorify or vilify them. About the only thing you can’t [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes.</p>
<p>The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo. You can quote them, disagree with them, glorify or vilify them.</p>
<p>About the only thing you can’t do is ignore them. Because they change things. They invent. They imagine. They heal. They explore. They create. They inspire. They push the human race forward.</p>
<p>Maybe they have to be crazy.</p>
<p>How else can you stare at an empty canvas and see a work of art? Or sit in silence and hear a song that’s never been written? Or gaze at a red planet and see a laboratory on wheels?</p>
<p>While some see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/8rwsuXHA7RA" frameborder="0" allowfullscreen></iframe></p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=255&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/thNyLKYq5vQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/heres-to-the-crazy-ones/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/heres-to-the-crazy-ones/</feedburner:origLink></item>
		<item>
		<title>iPhone : How to URL encode a string</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/IEZp2sY6Ofg/</link>
		<comments>http://vxtindia.com/blog/iphone-how-to-url-encode-a-string/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 20:44:46 +0000</pubDate>
		<dc:creator>Sudhanshu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=249</guid>
		<description><![CDATA[You would expect that stringByAddingPercentEscapesUsingEncoding would easily encode your strings, but since Apple devs usually spend time on more convoluted problems, this still doesn&#8217;t work, even after the fifth major iteration of the SDK. So, if you need to URL encode a string, here is what you have to do NSString *encoded = (NSString *)CFURLCreateStringByAddingPercentEscapes( [...]]]></description>
			<content:encoded><![CDATA[<p>You would expect that <em>stringByAddingPercentEscapesUsingEncoding</em> would easily encode your strings, but since Apple devs usually spend time on more convoluted problems, this still doesn&#8217;t work, even after the fifth major iteration of the SDK.</p>
<p>So, if you need to URL encode a string, here is what you have to do</p>
<p><code>NSString *encoded = (NSString *)CFURLCreateStringByAddingPercentEscapes(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CFStringRef)unencodedString,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NULL,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CFStringRef)@"!*'();:@&#038;=+$,/?%#[]",<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kCFStringEncodingUTF8<br />
);</code></p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=249&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/IEZp2sY6Ofg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/iphone-how-to-url-encode-a-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/iphone-how-to-url-encode-a-string/</feedburner:origLink></item>
		<item>
		<title>How to setup your new VPS Ubuntu server</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/j6KJDcOtzjQ/</link>
		<comments>http://vxtindia.com/blog/how-to-setup-your-new-vps-ubuntu-server/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 08:12:27 +0000</pubDate>
		<dc:creator>Sudhanshu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=202</guid>
		<description><![CDATA[Every time you purchase a new Linux VPS, you need to go ahead and set it up for use. Even though we manage to do one server a month, we always seem to forget one thing or the other. So we decided to write down the things that we do. I thought it would be [...]]]></description>
			<content:encoded><![CDATA[<p>Every time you purchase a new Linux VPS, you need to go ahead and set it up for use. Even though we manage to do one server a month, we always seem to forget one thing or the other. So we decided to write down the things that we do. I thought it would be a good thing to share it with everybody as well, so that we could get a few comments about what we&#8217;re doing wrong, and people who do it the first time can probably pick up a few things from here.</p>
<p>If you haven&#8217;t purchased a server yet, I would suggest you go read <a href='http://vxtindia.com/blog/the-ultimate-vps-purchasing-guide/'>The Guide to VPS Servers</a> first.</p>
<p>I have a fascination with Ubuntu and I think it&#8217;s the easiest to work with, so I&#8217;m going to go ahead and assume that you&#8217;re working on the same too.</p>
<p>Okay, now that you have a server, let&#8217;s start setting it up.</p>
<p># Update Ubuntu to get the latest packages<br />
<code>$ aptitude update<br />
$ aptitude safe-upgrade<br />
$ aptitude install htop<br />
$ locale-gen en_US.UTF-8<br />
$ update-locale LANG=en_US.UTF-8</code></p>
<p># Set the hostname<br />
<code>$ vi /etc/hostname<br />
<small>Here you need add your hostname, for example vxtindia.com</small></code></p>
<p># Add the admin group and user<br />
<code>$ adduser admin<br />
$ visudo<br />
<small>You need to add the following here<br />
%admin ALL=(ALL) ALL</small></code></p>
<p># Add the other users<br />
<code>$ adduser admin2<br />
$ usermod -a G admin admin2<br />
$ adduser deploy<br />
$ adduser deploy2<br />
$ usermod -a -G deploy deploy2<br />
<small>It's also a good idea to add this for each user<br />
$ vi .bashrc<br />
and the add the following at the end of the file<br />
- PS1='\[\033[0;35m\]\u@\h\[\033[0;33m\] \w\[\033[00m\]: '</small></code></p>
<p># Install Git (if you don&#8217;t use it, please start now)<br />
<code>aptitude install git-core</code></p>
<p># Edit SSH Config to make it more secure<br />
<code>$ vi /etc/ssh/sshd_config<br />
<small>Once inside, make sure that the following values match<br />
Port 8888<br />
Protocol 2<br />
UseDNS no<br />
Once you're done run the command below</small><br />
$ /etc/init.d/ssh reload</code></p>
<p># Install Apache2<br />
<code>$ aptitude install apache2<br />
$ vi /etc/apache2/apache2.conf<br />
<small>Once inside, make sure the following values are set<br />
KeepAliveTimeout 5<br />
Timeout 30<br />
MaxKeepAliveRequests 400</small><br />
$ vi /etc/apache2/conf.d/servername.conf<br />
<small>Set the following here<br />
ServerName vxtindia.com</small><br />
$ vi /etc/apache2/conf.d/security<br />
<small>Set the following here<br />
ServerTokens Minimal<br />
ServerSignature Off</small><br />
$ apache2ctl restart<br />
$ aptitude install lynx</code></p>
<p># Install MYSQL<br />
<code>$ aptitude install mysql-server mysql-client</code></p>
<p># Install phpmyadmin<br />
<code>$ aptitude install phpmyadmin</code></p>
<p># Install PHP<br />
<code>$ aptitude install php5 php5-json php5-cli php5-mysql php5-dev php5-curl php5-gd php5-imagick php5-mcrypt php5-memcache php5-mhash php5-pspell php5-snmp php5-sqlite php5-xmlrpc php5-xsl<br />
$ apache2ctl restart</code></p>
<p># Install postfix<br />
<code>$ aptitude install postfix telnet mailutils<br />
<small>Set/Choose the following options here<br />
Internet Site<br />
System Mail Name = vxtindia.com<br />
Note: postfix log files are at /var/log/mail.info, /var/log/mail.warn, /var/log/mail.err, /var/log/mail.log<br />
Note: postfix config files are at /etc/postfix</small><br />
$ vi /etc/postfix/main.cf<br />
<small>Set the hostname here<br />
myhostname = vxtindia.com</small><br />
$ vi /etc/mailname<br />
<small>Set it again here<br />
vxtindia.com</small><br />
$ postfix reload<br />
$ vi /etc/aliases<br />
<small>Note: save it to external email where server can report abuse<br />
postmaster:  abuse@vxtindia-external.com<br />
Note: Change reverse DNS by going to https://www.linode.com/members/linode/rdns.cfm<br />
vxtindia.com</small></code></p>
<p># Install Munin (Master)<br />
<code>$ aptitude install munin munin-node<br />
$ vi /etc/munin/munin.conf<br />
<small>It should like the following<br />
dbdir   /var/lib/munin<br />
htmldir /var/cache/munin/www<br />
logdir /var/log/munin<br />
rundir  /var/run/munin<br />
contact.vxtindia.command mail -s "Munin notification" server@vxtindia.com<br />
[vxtindia.com]<br />
&nbsp;&nbsp;&nbsp;&nbsp;address 127.0.0.1<br />
&nbsp;&nbsp;&nbsp;&nbsp;use_node_name yes</small><br />
$ chown -R munin /var/cache/munin/www/<br />
$ vi /etc/munin/munin-node.conf<br />
<small>Set the following<br />
host 127.0.0.1</small><br />
$ service munin-node restart<br />
<small>Note: You can also use /etc/init.d/munin-node restart</small><br />
$ vi /etc/apache2/sites-enabled/000-default<br />
<small>Here you set the following<br />
Alias /munin /var/cache/munin/www<br />
&lt;Directory /var/cache/munin/www&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Options FollowSymLinks<br />
&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride AuthConfig<br />
&nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br />
&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br />
&lt;/Directory&gt;</small><br />
$ apache2ctl restart<br />
$ vi /var/cache/munin/www/.htaccess<br />
<small>Make sure the following are there<br />
AuthUserFile /var/cache/munin/.htpasswd<br />
AuthGroupFile /dev/null<br />
AuthName "Munin"<br />
AuthType Basic<br />
&nbsp;<br />
&lt;Limit GET&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;require valid-user<br />
&lt;/Limit&gt;</small><br />
$ cd /var/cache/munin<br />
$ htpasswd -c .htpasswd admin</code></p>
<p># Install Munin (Slave)<br />
<code>$ aptitude install munin-node<br />
$ vi /etc/munin/munin-node.conf<br />
<small>Add the following<br />
allow ^72\.14\.190\.63$<br />
host 69.164.194.243</small><br />
$ vi /etc/iptables.up.rules<br />
<small>Add the following<br />
# Munin<br />
-I INPUT -p tcp --dport 4949 -m state --state NEW,ESTABLISHED -j ACCEPT<br />
-I OUTPUT -p tcp --dport 4949 -m state --state ESTABLISHED -j ACCEPT</small><br />
$ iptables-restore < /etc/iptables.up.rules<br />
$ /etc/init.d/munin-node restart<br />
&nbsp;<br />
<small>Note: Add details to the master</small><br />
$vi /etc/munin/munin.conf<br />
<small>[a1.88things.com]<br />
&nbsp;&nbsp;&nbsp;&nbsp;address 69.164.194.243<br />
&nbsp;&nbsp;&nbsp;&nbsp;user_node_name yes</small><br />
$ vi /etc/iptables.up.rules<br />
<small>-I OUTPUT -p tcp --dport 4949 -m state --state NEW,ESTABLISHED -j ACCEPT<br />
-I INPUT -p tcp --dport 4949 -m state --state ESTABLISHED -j ACCEPT</small><br />
$ iptables-restore < /etc/iptables.up.rules<br />
$ /etc/init.d/munin-node restart</code></p>
<p># Install Munin Plugins<br />
<code>$ aptitude install libwww-perl<br />
$ munin-node-configure --suggest<br />
$ ln -s /usr/share/munin/plugins/apache_accesses /etc/munin/plugins/apache_accesses<br />
$ ln -s /usr/share/munin/plugins/apache_processes /etc/munin/plugins/apache_processes<br />
$ ln -s /usr/share/munin/plugins/apache_volume /etc/munin/plugins/apache_volume<br />
$ ln -s /usr/share/munin/plugins/ip_ /etc/munin/plugins/ip_</code></p>
<p># Setting up IPtables<br />
<code>$ iptables -F<br />
<small>Add this</small><br />
$ vi /etc/iptables.up.rules<br />
<small>*filter<br />
&nbsp;<br />
#  Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0<br />
-A INPUT -i lo -j ACCEPT<br />
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT<br />
&nbsp;<br />
#  Accepts all established inbound connections<br />
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br />
&nbsp;<br />
#  Allows all outbound traffic<br />
#  You can modify this to only allow certain traffic<br />
-A OUTPUT -j ACCEPT<br />
&nbsp;<br />
# Allows HTTP and HTTPS connections from anywhere (the normal ports for websites)<br />
-A INPUT -p tcp --dport 80 -j ACCEPT<br />
-A INPUT -p tcp --dport 443 -j ACCEPT<br />
&nbsp;<br />
#  Allows SSH connections<br />
#<br />
# THE -dport NUMBER IS THE SAME ONE YOU SET UP IN THE SSHD_CONFIG FILE<br />
#<br />
-A INPUT -p tcp -m state --state NEW --dport 8888 -j ACCEPT<br />
&nbsp;<br />
# Allow ping<br />
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT<br />
&nbsp;<br />
# log iptables denied calls<br />
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7<br />
&nbsp;<br />
# Reject all other inbound - default deny unless explicitly allowed policy<br />
-A INPUT -j REJECT<br />
-A FORWARD -j REJECT<br />
&nbsp;<br />
COMMIT</small><br />
$ iptables-restore &lt; /etc/iptables.up.rules<br />
$ vi /etc/network/if-pre-up.d/iptables<br />
<small>Add this to the file<br />
#!/bin/sh<br />
/sbin/iptables-restore &lt; /etc/iptables.up.rules</small><br />
$ chmod +x /etc/network/if-pre-up.d/iptables<br />
$ /etc/init.d/ssh restart</code></p>
<p># Install Fail2ban<br />
<code>$ aptitude install fail2ban<br />
$ cd /etc/fail2ban/<br />
$ cp jail.conf jail.local<br />
$ vi jail.local<br />
<small>Add this<br />
destemail = someaddress@vxtindia.com<br />
mta = mail</small><br />
$ service fail2ban restart</code></p>
<p>This constitutes your basic server setup. There are a ton of more things that you can do, but for setting up a development server, this should be more than enough.</p>
<p>If you are still curious, here are a few more things you should have a look at<br />
1. LogRotate (<a href='http://articles.slicehost.com/2010/6/30/understanding-logrotate-on-ubuntu-part-1'>Part 1</a>, <a href='http://articles.slicehost.com/2010/6/30/understanding-logrotate-on-ubuntu-part-2'>Part 2</a>)<br />
2. VirtualHosts (<a href='http://articles.slicehost.com/2010/5/19/apache-virtual-hosts-on-ubuntu-part-1'>Part 1</a>, <a href='http://articles.slicehost.com/2010/5/19/apache-virtual-hosts-on-ubuntu-part-2'>Part 2</a>)<br />
3. WordPress Backup (<a href='http://wordpress.org/extend/plugins/wordpress-backup/'>1</a>, <a href='http://wordpress.org/extend/plugins/wp-db-backup/'>2</a>, <a href='http://wordpress.org/extend/plugins/backupwordpress/'>3</a>, <a href='http://www.tamba2.org.uk/wordpress/cron/'>4</a>, <a href='http://wordpress.org/extend/plugins/wp-dbmanager/'>5</>, <a href='http://wordpress.org/extend/plugins/wp-db-backup/'>6</a>)<br />
4. Hosting Git (<a href='http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way'>1</a>, <a href='http://blog.drewolson.org/2008/05/remote-git-repos-on-ubuntu-right-way.html'>2</a>, <a href='http://blog.agdunn.net/?p=277'>3</a>, <a href='http://manpages.ubuntu.com/manpages/intrepid/man1/git-daemon.1.html'>4</a>)</p>
<p>Do you have more things that you do, please let me know in the comments.</p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=202&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/j6KJDcOtzjQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/how-to-setup-your-new-vps-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/how-to-setup-your-new-vps-ubuntu-server/</feedburner:origLink></item>
		<item>
		<title>The ultimate VPS purchasing guide</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/yzazkVLr97I/</link>
		<comments>http://vxtindia.com/blog/the-ultimate-vps-purchasing-guide/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 07:32:02 +0000</pubDate>
		<dc:creator>Sudhanshu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=204</guid>
		<description><![CDATA[If you&#8217;re planning to start a web application, the first thing that you need is to setup your own server. Usually people start with shared hosting, which sucks if you&#8217;re trying to run anything more than a wordpress site. A dedicated server is expensive, and can range between $200 &#8211; $9000/month. The best thing to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://vxtindia.com/blog/wp-content/uploads/2011/08/3780220955_f519f4ca70-300x199.jpg" alt="" title="3780220955_f519f4ca70" width="300" height="199" class="alignright size-medium wp-image-205" style="float: right;" /></p>
<p>If you&#8217;re planning to start a web application, the first thing that you need is to setup your own server. Usually people start with shared hosting, which sucks if you&#8217;re trying to run anything more than a wordpress site. A dedicated server is expensive, and can range between $200 &#8211; $9000/month. The best thing to start out with is a VPS or a Virtual Private Server. It gives you completely flexibility since you are root and the price is between a shared hosting and a dedicated server.</p>
<p>If you decide that you do need a VPS server, there are a ton of things to look out for. Though as with all things, the internet is full of how to do it. As far as I see, there are 5 hosting companies that I get servers in. I&#8217;ll run you through each of them, and maybe it will help you decide which one is the right fit for you.</p>
<p>So here we go:</p>
<blockquote><p>1. <a href='http://slicehost.com'>Slicehost</a><br />
This used to be my first choice, though I&#8217;m not too sure after it was purchased by Rackspace. I have a feeling that they&#8217;ll be moving all their customers to Rackspace Cloud sooner or later. This is also slightly expensive, but in terms of the UI of their admin and the Knowledge base, these guys are the best.</p></blockquote>
<blockquote><p>2. <a href='http://rackspacecloud.com'>Rackspace Cloud</a><br />
This service is by Rackspace and started after they acquired Slicehost. It&#8217;s cheaper than Slicehost in the sense that the price that you see is only for the server and not for the bandwidth (Slicehost&#8217;s plans include both the server and the bandwidth). A simple calculation shows that if your bandwidth usage is less than 72GB/month, Rackspace Cloud would be the cheaper alternative. Our server runs on this too. Their admin UI is picked up from Slicehost and does almost all of the things that Slicehost does, but it&#8217;s a lot uglier and slower.</p></blockquote>
<blockquote><p>3. <a href='http://linode.com'>Linode</a><br />
This is also a really cool provider. It&#8217;s cheaper than Slicehost and recently we have moved almost all our clients here. They have an Extensive knowledge based and the support is also top-class. If I compare the support, I&#8217;m not sure which is better Slicehost or Linode. Also, since Linode is cheaper as well, we have started recommending this.</p></blockquote>
<blockquote><p>4. <a href='http://prgmr.com'>Prgmr</a><br />
This is a site which assumes you&#8217;re smart. Since you&#8217;re already here reading this post on our blog, I assume you&#8217;re pretty smart as well. If you are the no-frills kind of a person looking for super cheap and reliable VPS hosting, this is the place for you. Interestingly, there is no admin UI here, you directly connect via SSH and do whatever it is you want to do. It is also significantly cheaper than the other options here. I own a couple of servers here as well.</p></blockquote>
<blockquote><p>5. <a href='http://aws.amazon.com/ec2/'>Amazon EC2</a><br />
This is undoubtedly the most popular one out there, but what most people don&#8217;t realize is that it&#8217;s really a cheaper alternative if you&#8217;re used to buying $1000/month dedicated servers. When compared to the other VPS services, this is massively expensive.</p></blockquote>
<h2>Conclusion</h2>
<p>While we are on this topic, you should read <a href='http://journal.uggedal.com/vps-performance-comparison/'>this post from uggedel.com</a>. It provides a great comparison between the most popular services and based on it you can decide what do you want to purchase.</p>
<p>Finally, one last link worth sharing is <a href='http://lowendbox.com'>LowEndBox.com</a>. If you&#8217;re looking for a cheap server, this is just the place to find one. The reviews are really good and no matter how often you work with servers, you&#8217;ll always pick up a few things here.</p>
<p>In Conclusion, no matter what your budget, no matter what your requirements, you will always find something that is just right for you. All you have to do, is know what you want, and you shall get it.</p>
<p>Do let me know if you have any questions, or if you know any better services that we should try out.</p>
<p><small>Image via <a href='http://www.flickr.com/photos/zunami/3780220955/'>zunami</a></small></p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=204&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/yzazkVLr97I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/the-ultimate-vps-purchasing-guide/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/the-ultimate-vps-purchasing-guide/</feedburner:origLink></item>
		<item>
		<title>Visualizing Git</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/WA8HlXn6UF0/</link>
		<comments>http://vxtindia.com/blog/visualizing-git/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 09:17:47 +0000</pubDate>
		<dc:creator>Sudhanshu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=193</guid>
		<description><![CDATA[We have always been big fans for Github, but recently decided to move from github to hosting them ourselves. The only reason was that we have a lot of projects going on and because of that github started getting a little too expensive for us. So we decided to start hosting repositories ourselves. When you [...]]]></description>
			<content:encoded><![CDATA[<p>We have always been big fans for Github, but recently decided to move from github to hosting them ourselves. The only reason was that we have a lot of projects going on and because of that github started getting a little too expensive for us. So we decided to start hosting repositories ourselves.</p>
<p>When you migrate from github, the first thing that hits you is that the UI is no more there. You can see who is committing what or what new changes were added to each project. So, I decided to write a small Generatrix based application to fetch the git information and show it on the website. The result turned out to be quite okay. Our interfaces aren&#8217;t as advanced as github, but the more time we spend on it, the better it&#8217;ll get I guess (ofcourse, the people at github will add even more features and so on).</p>
<p>Here are a few screenshots, do let us know what do you think.</p>
<p><a href="http://vxtindia.com/blog/wp-content/uploads/2010/11/dashboard1.png"><img src="http://vxtindia.com/blog/wp-content/uploads/2010/11/dashboard1-1024x632.png" alt="" title="dashboard1" width="630" height="387" class="alignleft size-large wp-image-194" /></a></p>
<p><a href="http://vxtindia.com/blog/wp-content/uploads/2010/11/dashboard2.png"><img src="http://vxtindia.com/blog/wp-content/uploads/2010/11/dashboard2-1024x623.png" alt="" title="dashboard2" width="630" height="387" class="alignleft size-large wp-image-195" /></a></p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=193&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/WA8HlXn6UF0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/visualizing-git/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/visualizing-git/</feedburner:origLink></item>
		<item>
		<title>Upgrades to Generatrix</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/_T4AkUTlUM8/</link>
		<comments>http://vxtindia.com/blog/upgrades-to-generatrix/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 08:41:55 +0000</pubDate>
		<dc:creator>Sudhanshu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[generatrix]]></category>
		<category><![CDATA[initiatives]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=186</guid>
		<description><![CDATA[Generatrix is our PHP5 stack for building web based applications. We have been working on it for quite some time and over 20 websites have been built on top of it already. Yet, there are always new things which need to be added to ensure that it&#8217;s up to date with the latest happenings in [...]]]></description>
			<content:encoded><![CDATA[<p>Generatrix is our PHP5 stack for building web based applications. We have been working on it for quite some time and over 20 websites have been built on top of it already. Yet, there are always new things which need to be added to ensure that it&#8217;s up to date with the latest happenings in the web world.</p>
<blockquote><p><b>Changes made to Generatrix</b></p>
<p>1. Facebook Connect has been integrated (<a href="https://github.com/vercingetorix/Generatrix/commit/a8acda27fc46e2df0284e25a67af100efe0d2a55">link</a>)<br />
2. For applications which run via subdomains, controller has a function to get your subdomain value. (<a href="https://github.com/vercingetorix/Generatrix/commit/70b9f0cab58732768c9f7f9128ad951b690bd14e">link</a>)<br />
3. Added components to allow controller to use ready made classes (<a href='https://github.com/vercingetorix/Generatrix/commit/5da7ff8e1f98fd372e5c4df885a20c9ad9c6c8dd'>link</a>)<br />
4. Added support for Google Fonts (<a href='https://github.com/vercingetorix/Generatrix/commit/f6a1d55d630cd0e4d621abcb792700777691ab5e'>link</a>)<br />
5. Pull CDN support &#8211; MaxCDN (<a href='https://github.com/vercingetorix/Generatrix/commit/cda2e62df55a4bef8261713b8b4c55bd98933cfa'>link</a>)<br />
6. Included TypeConverter from <a href="http://github.com/milesj/php-type_converter">http://github.com/milesj/php-type_converter</a> (<a href='https://github.com/vercingetorix/Generatrix/commit/8568785d0f26c34c189c2cc294fa1e81afea5651'>link</a>)<br />
7. Changed head to support mobile website (<a href='https://github.com/vercingetorix/Generatrix/commit/ac429d22f0ff85cc4063a9263459f5e288e48067'>link</a>)<br />
8. Added urlencode and urldecode to javascript (<a href='https://github.com/vercingetorix/Generatrix/commit/10dcd83606a4a612b2eedfcf0cb229f3d77ac40e'>link</a>)<br />
9. Works on windows as well (<a href='https://github.com/vercingetorix/Generatrix/commit/407cd0921081fcdf0c18b65373e5f4a966583f05'>link</a>)
</p></blockquote>
<p>If you haven&#8217;t already, do try it out. You can download the latest version <a href="http://github.com/vercingetorix/Generatrix">here</a>.</p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=186&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/_T4AkUTlUM8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/upgrades-to-generatrix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/upgrades-to-generatrix/</feedburner:origLink></item>
		<item>
		<title>Custom URLs for WordPress plugins</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/wxYi135a0lw/</link>
		<comments>http://vxtindia.com/blog/custom-urls-for-wordpress-plugins/#comments</comments>
		<pubDate>Tue, 25 May 2010 15:13:31 +0000</pubDate>
		<dc:creator>Adhip</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=126</guid>
		<description><![CDATA[WordPress is great at handling URLs and making them &#8216;pretty&#8217; with custom permalinks. You can use almost any kind of URL structure for your website using the &#8216;Custom Permalinks&#8217; tags. However, this fails in case you want to have permalinks that a plug-in should recognize and redirects you to the WordPress 404 page. For example, [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress is great at handling URLs and making them &#8216;pretty&#8217; with custom permalinks. You can use almost any kind of URL structure for your website using the &#8216;Custom Permalinks&#8217; tags. However, this fails in case you want to have permalinks that a plug-in should recognize and redirects you to the WordPress 404 page.</p>
<p>For example, if you have a page called calendar accessible via http://my-website.com/calendar which is essentially a page that is generated via a custom template or a shortcode, a URL like http://my-website.com/calendar/2010/march will lead to to a 404 page. The easiest solution to avoid this is to have a URL like http://my-website.com/calendar/?year=2010&amp;month=march which given the rest of your website will look plain ugly.</p>
<p>We can however use the WP_Rewrite class and extend the set of rules that WordPress processes to ensure that our rule is processed like we want it.</p>
<p>We recently used this for one of our websites which you can view here <a href='http://doggiepuppies.com/dog-breed/Australian-Shepherd/'>Australian Shephard Dog Breed</a> or <a href='http://doggiepuppies.com/dog-breed/Beagle/'>Beagle Dog Breed</a></p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=126&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/wxYi135a0lw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/custom-urls-for-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/custom-urls-for-wordpress-plugins/</feedburner:origLink></item>
		<item>
		<title>Tracking online status</title>
		<link>http://feedproxy.google.com/~r/TheDiscussionDelegate/~3/Sjleu4Gj1rY/</link>
		<comments>http://vxtindia.com/blog/tracking-online-status/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 14:22:46 +0000</pubDate>
		<dc:creator>Sudhanshu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://vxtindia.com/blog/?p=157</guid>
		<description><![CDATA[This is not about tracking your status on the plethora of social networking sites, rather about checking up if our internet connection is still active! We have been using a data connection from Reliance for quite some time, but the connection keeps failing quite frequently during summers. We wrote a script on our local servers [...]]]></description>
			<content:encoded><![CDATA[<p>This is not about tracking your status on the plethora of social networking sites, rather about checking up if our internet connection is still active!</p>
<p><a href="http://vxtindia.com/blog/wp-content/uploads/2010/04/loggedin.png" style='float: left; padding: 0px 10px 10px 0px; '><img src="http://cdn.vxtindia.com/blog/wp-content/uploads/2010/04/loggedin.png" alt="" title="loggedin" width="323" height="610" class="alignleft size-full wp-image-158" /></a></p>
<p>We have been using a data connection from Reliance for quite some time, but the connection keeps failing quite frequently during summers. We wrote a script on our local servers to keep connecting us to the ISP&#8217;s servers whenever they log us out, so we thought of using that information to create a Online Status Tracker for our office. Here is what it looks like:</p>
<p>Not only does this provide a status, it also gives us an update on what is the latest status if the connection is being initiated, or if their login page isn&#8217;t loading (which happens quite frequently).</p>
<p>Having an undying internet connection would be really cool, but till Reliance decides to get that in place, all we can do is enjoy our little tools.</p>
<p><br clear='all' /></p>
<img src="http://vxtindia.com/blog/?ak_action=api_record_view&id=157&type=feed" alt="" /><img src="http://feeds.feedburner.com/~r/TheDiscussionDelegate/~4/Sjleu4Gj1rY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://vxtindia.com/blog/tracking-online-status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://vxtindia.com/blog/tracking-online-status/</feedburner:origLink></item>
	</channel>
</rss>

