<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Vinsol - Leading Ruby on Rails Development and Consulting Firm in India &#187; hosting</title>
	<atom:link href="http://vinsol.com/blog/category/hosting/feed/" rel="self" type="application/rss+xml" />
	<link>http://vinsol.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 08:37:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hosting Rails app and Wordpress on same domain(as folder instead of subdomain)</title>
		<link>http://vinsol.com/blog/2008/08/08/hosting-rails-app-and-wordpress-on-same-domainas-folder-instead-of-subdomain/</link>
		<comments>http://vinsol.com/blog/2008/08/08/hosting-rails-app-and-wordpress-on-same-domainas-folder-instead-of-subdomain/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 08:35:31 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://webonrails.com/2008/08/08/hosting-rails-app-and-wordpress-on-same-domainas-folder-instead-of-subdomain/</guid>
		<description><![CDATA[Hey guys, Yesterday I did an interesting server configuration. Actually we had a rails app hosted on server which is using passenger(a.k.a mod_rails). This application can be access by going to http://domain.com . Also we had a wordpress running which could be access by going to http://blog.domain.com. 
But, for SEO sake I had to change [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Hey guys, Yesterday I did an interesting server configuration. Actually we had a rails app hosted on server which is using <a href="http://www.modrails.com/" target = '_blank'>passenger</a>(a.k.a mod_rails). This application can be access by going to http://domain.com . Also we had a wordpress running which could be access by going to http://blog.domain.com. </p>
<p>But, for SEO sake I had to change configuration so that wordpress can be access by http://domain.com/blog instead of http://blog.domain.com/</p>
<p>The problem was if I configure wordpress for http://domain.com/blog and go to this url, the request was handled by rails app because of domain.com virtualhost. </p>
<p>So what I did? I changed apache virtualhost configuration for http://blog.domain.com and http://domain.com as:</p>
<textarea name="code" class="c" cols="50" rows="10">
<VirtualHost *>
    ServerName blog.domain.com

    DocumentRoot /var/www/html/wordpress/
    <Directory "/var/www/html/wordpress/">
      Options FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
   </Directory>
 </VirtualHost>


<VirtualHost *>
    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /var/www/html/domain/current/public
    <Directory "/var/www/html/domain/current">
      Options FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all
    </Directory>
    
  RailsAllowModRewrite  on
  RewriteRule ^/blog/?(.*)$ http://blog.domain.com/$1 [P,NC,L]

 </VirtualHost>

</textarea>
<p>Also I created a symbolic link to wordpress installation directory under rails public folder(ln -s /var/www/html/wordpress /var/www/html/railsapp/blog).</p>
<p>I restarted apache and it worked fine. Wordpress was running at http://domain.com/blog and rails app was as http://domain.com/.
</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2008/08/08/hosting-rails-app-and-wordpress-on-same-domainas-folder-instead-of-subdomain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presented at BarCampDelhi3</title>
		<link>http://vinsol.com/blog/2007/12/10/presented-at-barcampdelhi3/</link>
		<comments>http://vinsol.com/blog/2007/12/10/presented-at-barcampdelhi3/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 07:57:33 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[Barcamp]]></category>
		<category><![CDATA[Delhi]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://webonrails.com/2007/12/10/presented-in-barcampdelhi3/</guid>
		<description><![CDATA[Yesterday, I attended third barcamp in delhi. I presented a session &#8220;Deploying rails application in EC2&#8243;.  It was an amazing experience. We talked about EC2 and I have given a demo &#8220;How to deploy rails application on EC2&#8243;.
I personally didn&#8217;t like some sessions that are based on marketing. There were people from some hosting [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I attended<a href="http://www.barcamp.org/BarCampDelhi3"> third barcamp in delhi</a>. I presented a session &#8220;Deploying rails application in EC2&#8243;.  It was an amazing experience. We talked about EC2 and I have given a demo &#8220;How to deploy rails application on EC2&#8243;.</p>
<p>I personally didn&#8217;t like some sessions that are based on marketing. There were people from some hosting company and after every 2 mins they were saying &#8220;we are the best&#8221;. I think this should not happen in barcamp. As far as I know about barcamp, it is for sharing your experiences, Talking about new technology, but not for promoting your company.</p>
<p>I think that, at BarCamp there should be sessions on new things, not on the things that are popular and have similar other services.</p>
<p>There was a very good session by  Jinesh Varia on Amazon Cloud Computing. He included Amazon&#8217;s simple storage system, and  Amazon&#8217;s cloud computing(Ec2) in his presentation. He also helped me to answering people while the demo. He gave me a hint that very soon there will a news from Amazon that will surprise us. </p>
<p>I have uploaded my presentation slides on Slideshare.net:</p>
<div  id="__ss_197972"><object  width="425" height="355">
<param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=deploying-rails-app-on-ec2-1197272291134652-3"/>
<param name="allowFullScreen" value="true"/>
<param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=deploying-rails-app-on-ec2-1197272291134652-3" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div ><a href="http://www.slideshare.net/?src=embed"><img src="http://static.slideshare.net/swf/logo_embd.png"  alt="SlideShare"/></a> | <a href="http://www.slideshare.net/bansalakhil/deploying-rails-app-on-ec2" title="View 'Deploying Rails App On Ec2' on SlideShare">View</a> | <a href="http://www.slideshare.net/upload">Upload your own</a></div>
</div>
<p>Thanks to <a href="http://impetus.com">Impetus</a> Noida for Hosting Barcamp for second time and <a href="http://www.opera.com/">Opera</a> for Beer.
</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2007/12/10/presented-at-barcampdelhi3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running Rails Application on https with pound</title>
		<link>http://vinsol.com/blog/2007/09/13/running-rails-application-on-https-with-pound/</link>
		<comments>http://vinsol.com/blog/2007/09/13/running-rails-application-on-https-with-pound/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 13:58:56 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[mongrel_cluster]]></category>
		<category><![CDATA[pound]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://webonrails.com/2007/09/13/running-rails-application-on-https-with-pound/</guid>
		<description><![CDATA[Hours ago, I posted about, &#8220;How to deploy rails application with pound as a Balancer&#8221;.
Lets run rails application on https with pound. For that your machine should have:
* Pound installed with ssl support
* Pound and mongrels running
Now, First of all we need a ssl certificate, that can be generate by issuing &#8220;openssl req -x509 -newkey [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Hours ago, I posted about, <a href="http://webonrails.com/2007/09/13/deploying-rails-application-with-pound-as-a-balancer/" target = "_blank">&#8220;How to deploy rails application with pound as a Balancer&#8221;</a>.</p>
<p>Lets run rails application on https with pound. For that your machine should have:</p>
<p>* Pound installed with ssl support<br />
* Pound and mongrels running</p>
<p>Now, First of all we need a ssl certificate, that can be generate by issuing <strong>&#8220;openssl req -x509 -newkey rsa:1024 -keyout mydomain.pem  -out mydomain.pem -days 365 -nodes&#8221;</strong> . Give all the information it asks. Now copy mydomain.pem to /etc/pound/ directory(I am assuming that your pound.cfg file resides in /etc/pound/). Now put the following code in pound configuration file(/etc/pound/pound.cfg):</p>
<textarea name="code" class="c++" cols="50" rows="10">
ListenHTTPS
  Address 0.0.0.0
  Port    443
  Cert    "/etc/pound/mydomain.pem" 
  # pass along https hint
  AddHeader "X-Forwarded-Proto: https" 
  HeadRemove "X-Forwarded-Proto" 

Service
    URL "/(images|stylesheets|javascripts)/"
    BackEnd
        Address 127.0.0.1
        Port    8080
    End
    Session
        Type    BASIC
        TTL     300
    End

End

  Service
    BackEnd
      Address 127.0.0.1
      Port    8000
    End
    BackEnd
      Address 127.0.0.1
      Port    8001
    End
    BackEnd
      Address 127.0.0.1
      Port    8002
    End
  End
End
</textarea>
<p>I am assuming that your mongrels are running at ports 8000, 8001, 8002, apache running at 8080 and pound is listening ports 443 &#038; 80.<br />
Restart pound, and you are done. With this configuration all requests for dynamic content at port 443(https) will get redirected to mongrels and requests for static content will get redirected to apache.</p>
<p>You may want to check if the request is https or not before serving the content. That can be done by adding a before_filter (defined below) in application.rb  :</p>
<textarea name="code" class="ruby" cols="50" rows="10">
def confirm_ssl
  unless request.ssl?
    request.env["HTTPS"] = "on"
    redirect_to "/"
    return
  end
end
</textarea>
<p>By adding this method as before_filter in application.rb your application will check for https, if the request is not of type https it will redirect to an https request.
</p>
]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2007/09/13/running-rails-application-on-https-with-pound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploying rails application with pound as a Balancer</title>
		<link>http://vinsol.com/blog/2007/09/13/deploying-rails-application-with-pound-as-a-balancer/</link>
		<comments>http://vinsol.com/blog/2007/09/13/deploying-rails-application-with-pound-as-a-balancer/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 12:40:38 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[RubyonRails]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[mongrel_cluster]]></category>
		<category><![CDATA[pound]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://webonrails.com/2007/09/13/deploying-rails-application-with-pound-as-a-balancer/</guid>
		<description><![CDATA[Now a days Apache + mod_proxy + mongrel_clusters, Lighttpd + Mongrel cluster and Nginx + mongrel cluster are well known for deploying rails applications. 
You can also deploy your rails application with pound(a reverse proxy, load balancer and HTTPS front-end for Web server). 
First you need to setup mongrel_clusters for your rails application by issuing [...]


Related posts:<ol><li><a href='http://vinsol.com/blog/2009/11/16/11-things-to-consider-before-deploying-your-rails-application/' rel='bookmark' title='Permanent Link: 11 Things to Consider Before Deploying Your Ruby on  Rails Application'>11 Things to Consider Before Deploying Your Ruby on  Rails Application</a> <small>At VinSol, we have been developing and deploying Rails applications...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Now a days Apache + mod_proxy + mongrel_clusters, Lighttpd + Mongrel cluster and Nginx + mongrel cluster are well known for deploying rails applications. </p>
<p>You can also deploy your rails application with <a href="http://www.apsis.ch/pound/"  target= "_blank">pound</a>(a reverse proxy, load balancer and HTTPS front-end for Web server). </p>
<p>First you need to setup mongrel_clusters for your rails application by issuing &#8221; <strong>mongrel_rails cluster::configure -e production -p 8000 -a 127.0.0.1 -N 3 -c ./</strong> &#8221; inside the rails application root directory(on client machine). This will create mongrel_cluster.yml in config directory. You can change parameters in this command, as -p 8000 specifies that mongrel instances  will start  up on port  number starting 8000, -a 127.0.0.1 specifies that mongrel instances will listen to the localhost, -N specifies the number of mongrel instances and -c specifies the rails root directory.</p>
<p>Now you need to install pound(if not installed) by issuing following commands(as root):</p>
<ul>
<li>cd /opt/src</li>
<li>wget http://www.apsis.ch/pound/Pound-2.3.2.tgz</li>
<li>tar xzpf Pound-2.1.6.tgz</li>
<li>cd Pound-2.1.6</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
</ul>
<p>This will install pound in /usr/local/sbin/pound. In order to proceed further we need to create pound.cfg(pound configuration file) in /etc/pound/pound.cfg . Below is the content of pound.cfg:</p>
<p><textarea name="code" class="c++" cols="50" rows="10"></p>
<p>User &#8220;pound&#8221;<br />
Group &#8220;pound&#8221;</p>
<p>ListenHTTP<br />
  Address 0.0.0.0<br />
  Port 80<br />
  Service<br />
    BackEnd<br />
      Address 127.0.0.1<br />
      Port 8000<br />
    End<br />
    BackEnd<br />
      Address 127.0.0.1<br />
      Port 8001<br />
    End<br />
    BackEnd<br />
      Address 127.0.0.1<br />
      Port 8002<br />
    End<br />
  End<br />
End<br />
</textarea></p>
<p>Start mongrel cluster by issuing mongrel_rails cluster::start in you app root directory, start pound by /usr/local/sbin/pound -f /etc/pound/pound.cfg , now you are done. Pound is listening the port 80 and redirect all requests to mongrel instances running on 8000, 8001, 8002.</p>
<p>* Please Note that we have configured pound at port 80, if port 80 is being used by apache or any other application pound will not start. You need to stop any service using  port 80, if it is apache then stop apache, change line &#8216;Listen 80&#8242; to &#8220;Listen 8080&#8243; and start apache.</p>
<p>In a specific case, when apache is running at some port (let say 8080), you may want to use apache to serve static content of your application, in order to reduce some load from mongrels. In that case use the following:</p>
<p><textarea name="code" class="c++" cols="50" rows="10"></p>
<p>User &#8220;pound&#8221;<br />
Group &#8220;pound&#8221;</p>
<p>ListenHTTP<br />
  Address 0.0.0.0<br />
  Port 80<br />
  Service<br />
      URL &#8220;/(images|stylesheets|flash|javascripts)/&#8221;<br />
      BackEnd<br />
          Address 127.0.0.1<br />
          Port    8080<br />
      End<br />
      Session<br />
          Type    BASIC<br />
          TTL     300<br />
      End<br />
  End<br />
  Service<br />
    BackEnd<br />
      Address 127.0.0.1<br />
      Port 8000<br />
    End<br />
    BackEnd<br />
      Address 127.0.0.1<br />
      Port 8001<br />
    End<br />
    BackEnd<br />
      Address 127.0.0.1<br />
      Port 8002<br />
    End<br />
  End<br />
End<br />
</textarea></p>
<p>This will redirect all requests for image, stylesheets, javascripts, flash to apache. Now we need to configure apache to serve those static content. Just add a virtualhost for that:</p>
<p><textarea name="code" class="c++" cols="50" rows="10"><br />
<VirtualHost *:8080><br />
  ServerName example.com<br />
  ServerAlias www.example.com<br />
  DocumentRoot /var/www/html/example.com/public<br />
  <Directory "/var/www/html/example.com/public" ><br />
    Options FollowSymLinks<br />
    AllowOverride None<br />
    Order allow,deny<br />
    Allow from all<br />
  </Directory></p>
<p>  RewriteEngine On</p>
<p>  # For static files it&#8217;s good to avoid hitting your mongrel process<br />
  # so let apache knows it should serve it directly<br />
  # for a rails application it means, files in images / stylesheets / javascripts<br />
  RewriteRule &#8220;^/(images|stylesheets|flash|javascripts)/?(.*)&#8221; &#8220;$0&#8243; [L]</p>
<p></VirtualHost><br />
</textarea></p>
<p>Its all done. All requests for dynamic content at port 80 will be redirect to mongrel running at 8000, 8001, 8001 and requests for static content will be served by apache running at port 8080.</p>


<p>Related posts:<ol><li><a href='http://vinsol.com/blog/2009/11/16/11-things-to-consider-before-deploying-your-rails-application/' rel='bookmark' title='Permanent Link: 11 Things to Consider Before Deploying Your Ruby on  Rails Application'>11 Things to Consider Before Deploying Your Ruby on  Rails Application</a> <small>At VinSol, we have been developing and deploying Rails applications...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2007/09/13/deploying-rails-application-with-pound-as-a-balancer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
