<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<rss version="2.0">
<channel>
<title>GeekISP FAQ - The five questions posted most recently:</title>
<description>GeekISP Faq System</description>
<link>http://geekisp.com/faq</link>	<item>
		<title><![CDATA[How do I setup a Ruby On Rails application?]]></title>
		<description><![CDATA[<p>
Its very easy, assuming you&#39;re starting from scratch, SSH into login.geekisp.com and type:<br />
<br />
$ control_apache add mydomain.com<br />
$ cd www.mydomain.com<br />
$ rails myapp<br />
$ rm -r htdocs<br />
$ ln -s myapp/public htdocs<br />
$ chmod -R g+w myapp/log myapp/tmp
</p>
<p>
$ cp /usr/local/share/geekisp/rails/dot-htaccess htdocs/.htaccess
</p>
<p>
$ vi htdocs/.htaccess<br />
<br />
While editing the .htaccess file, add the following line right after the line that says &#39;RewriteEngine On&#39;:<br />
<br />
RewriteBase /<br />
<br />
This is necessary because of the way most virtual hosts are configured at GeekISP.  Under certain configurations, this step is not necessary, but it will never do any harm to add it.<br />
<br />
Now browse to www.mydomain.com and you should see the Rails welcome page. 
</p>
<p>
Note: With ROR 2.3, CGI mode is no longer installed by default.  While this is good in general, you still want the dispatch.cgi files, even if you&#39;re just going to use them briefly.  If you run 
</p>
<p>
rake rails:generate_dispatchers
</p>
<p>
The dispatch.* files will be repopulated. 
</p>
]]></description>
		<link>http://geekisp.com/faq/content/6/28/en/how-do-i-setup-a-ruby-on-rails-application.html</link>
		<pubDate>Tue, 31 Aug 2010 20:56:00 GMT</pubDate>
	</item>
	<item>
		<title><![CDATA[Why are persistent DB connections bad?]]></title>
		<description><![CDATA[<p>
Well ... they&#39;re not *bad*.  They&#39;re just less than ideal in many circumstances.  For long running programs such as Mongrel or FastCGI apps, or anything you&#39;re managing yourself on the shell server - a persistent DB connection is perfectly fine.  
</p>
<p>
The problems start to come in when you&#39;re using persistent DB connections from Apache &amp; PHP.  In this situation, PHP&#39;s mysql_pconnect() function doesn&#39;t always tear down the DB connection when you&#39;re done serving a page - it keeps it open in the background.  Big surprise, since you did ask for a persistent connection.  So what can happen is that you end up with a lot of idle connections to the database server, and eventually hit the limit of connections per user.
</p>
<p>
The reason for the above problem is pretty simple.  Apache works by forking off child to handle a web request.  If a child handles your web request and connects to the DB, then a different child handles the next request, and a different child your next request, you&#39;ve suddenly got 3 idle persistent connections.  Since we use a load balancer at GeekISP, you might have several idle connections from each backend webserver.  It starts to add up to a lot of idle connections.
</p>
<p>
The upside here is that it is a very easy fix - just change all calls of mysql_pconnect to mysql_connect, and your app won&#39;t have this problem.  MySQL connections are very inexpensive - especially over a gigabit LAN - so the overhead cost is still pretty small compared to actually running queries. 
</p>
]]></description>
		<link>http://geekisp.com/faq/content/3/85/en/why-are-persistent-db-connections-bad.html</link>
		<pubDate>Tue, 27 Jul 2010 17:54:00 GMT</pubDate>
	</item>
	<item>
		<title><![CDATA[How do I enable FTP?]]></title>
		<description><![CDATA[<p>
There&#39;s many different FTP servers available for Linux.  The simplest method to enable FTP is via the default system daemon, controlled by xinetd.
</p>
<p>
 
</p>
<p>
# yum install -y xinetd
</p>
<p>
# vi /etc/xinetd.d/gssftp
</p>
<p>
Comment out the line that says &#39;disable = yes&#39;. Check the server flags, and remove &#39;-a&#39;.
</p>
<p>
# service xinetd start
</p>
<p>
 
</p>
<p>
That&#39;s all that&#39;s required to enable a basic FTP server.  You can make accounts via &#39;adduser&#39; and &#39;passwd&#39;, and all of your regular Linux users can now use FTP. 
</p>
]]></description>
		<link>http://geekisp.com/faq/content/8/82/en/how-do-i-enable-ftp.html</link>
		<pubDate>Thu, 18 Mar 2010 00:10:00 GMT</pubDate>
	</item>
	<item>
		<title><![CDATA[How do I allow Apache to act as a proxy?]]></title>
		<description><![CDATA[<p>
Apache has the ability to act as a proxy in several different forms - the most common is the reverse HTTP proxy, by which Apache receives a HTTP request and forwards it onto another server.  The other server is typically something like Tomcat or other local webserver.
</p>
<p>
All the details of configuring mod_proxy are outside the scope of this FAQ, so you should consult the authoritative docs at <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html">http://httpd.apache.org/docs/2.2/mod/mod_proxy.html</a>.
</p>
<p>
Your GeekISP VPS has SELinux enabled by default, and in order to setup Apache as a proxy, you&#39;ll need to allow it to execute the connect call via:
</p>
<pre>
 # /usr/sbin/setsebool -P httpd_can_network_connect 1
</pre>
<p>
 
</p>
]]></description>
		<link>http://geekisp.com/faq/content/8/84/en/how-do-i-allow-apache-to-act-as-a-proxy.html</link>
		<pubDate>Tue, 02 Mar 2010 16:56:00 GMT</pubDate>
	</item>
	<item>
		<title><![CDATA[How do I open a firewall port?]]></title>
		<description><![CDATA[<p>
Your GeekISP VPS comes with a firewall enabled by default.  For most users, you&#39;ll want to open up a port to allow traffic into your server, to serve whatever content you bought the VPS for!  In general we recommend leaving your firewall locked down as much as possible, but there are obvious situations where you need to open a port - such as when you want to run a webserver on your VPS.  We use the stock CentOS firewall, iptables.
</p>
<p>
To open the HTTP port, you should use the &#39;iptables&#39; commands.  You can look for examples in the /etc/sysconfig/iptables file.  You can even edit that file directly if you are comfortable with the format therein.
</p>
<p>
If not, you can use &#39;iptables --list&#39; to see the current policy.  To open the HTTP port (port 80), run the following commands:
</p>
<pre>
# iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
</pre>
<pre>
# service iptables save 
</pre>
<p>
Inbound connections will now be accepted on the HTTP port. 
</p>
<p>
For more information on iptables, refer to the HOWTO: <a href="http://wiki.centos.org/HowTos/Network/IPTables ">http://wiki.centos.org/HowTos/Network/IPTables 
</a> 
</p>
]]></description>
		<link>http://geekisp.com/faq/content/8/83/en/how-do-i-open-a-firewall-port.html</link>
		<pubDate>Mon, 01 Mar 2010 19:44:00 GMT</pubDate>
	</item>
</channel>
</rss>