title: Apache (2) throws "No such file or directory: exec of '/usr/lib/cgi-bin/fst.cgi' failed"
body: <p>I am working in Ubuntu 10.10 (Maverick Meerkat) and running my <a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface" rel="noreferrer">CGI</a> script under <a href="http://en.wikipedia.org/wiki/Apache_HTTP_Server" rel="noreferrer">Apache</a>, but it is showing me the following error...</p>
  
  <blockquote>
    <p>[Sat errorNo such file or directory: exec of '/usr/lib/cgi-bin/fst.cgi' failed
    [Sat Oct 22 02:56:45 2011] [error] [client 127.0.0.1] Premature end of script headers: fst.cgi</p>
  </blockquote>
  
  <p>My script is</p>
  
  <pre><code>#!/usr/bin/perl
  print "Content-type:text/html\n\n";
  print "hello world";
  </code></pre>
  
  <p>I have set the permissions of the file...</p>
  
  <p>I have also added the following line in file <code>apache.conf</code>:</p>
  
  <pre><code>ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  
  &lt;Directory /usr/lib/cgi-bin/&gt;
     Options +ExecCGI
  &lt;/Directory&gt;
  
  AddHandler cgi-script .cgi .pl
  </code></pre>
  
  <p>But still it is showing me the same error. I have done all the possible changes, but I didn't get any success...</p>