Running cgi bash scripts in a Debian Slug as per my Sweex notes on this site

I keep forgetting! - so here are some basics

I am running lighttpd web server not Apache since that grabs lots of Swap space - so it must be slower.

Place index.html in /var/www but do not place bash scripts in /var/www/cgi-bin/
- they now go in /usr/lib/cgi-bin/

So in a browser I call and that runs /usr/lib/cgi-bin/i2c_test/i2c_test.cgi
and i2c_test.html,, all also go into /usr/lib/cgi-bin//i2c_test/

I also run PHP5 (apt-get install php5 php5.cgi)
phpinfo.php (containing just <?php phpinfo(); ?> ) runs if placed in /var/www/
or in /var/www/php_tests/ but not if placed in /usr/lib/cgi-bin/ or in /var/www/cgi-bin/