Enable Cgi Bin Execution

First we do a regular installation.
Our testing version was 2.2, so we have a clean httpd.conf for user customized stuff, so:

ocm@achtung:/etc/apache2$ sudo vi conf/httpd.conf
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/javaload

Now we add a dedicated directory in order to take place in here our code, so we can close rights in files, and add password auth if needed.

ocm@achtung:/etc/apache2$ sudo mkdir /usr/lib/cgi-bin/javaload

ocm@achtung:/usr/lib/cgi-bin/javaload$ more prueba.php
<?PHP
        phpinfo();
?>
ocm@achtung:/usr/lib/cgi-bin/javaload$

Now we can point our browser to perform this php function:
ocm@achtung: $ lynx http://localhost/cgi-bin/javaload/prueba.php

                                                                            phpinfo() (p1 of 60)
      PHP Logo

   PHP Version 5.3.6-13ubuntu3.3

   System Linux achtung 3.0.0-15-generic #25-Ubuntu SMP Mon Jan 2 17:45:26 UTC 2012 i686
   Build Date Dec 13 2011 18:11:18
   Server API Apache 2.0 Handler
   Virtual Directory Support disabled
   Configuration File (php.ini) Path /etc/php5/apache2
   Loaded Configuration File /etc/php5/apache2/php.ini
   Scan this dir for additional .ini files /etc/php5/apache2/conf.d
   Additional .ini files parsed /etc/php5/apache2/conf.d/gd.ini,
...
...

[((bibcite http://httpd.apache.org/docs/2.2/howto/cgi.html))]