FOX Board G20 technical documentation Buy
Save this "Hello world !" source code example in /var/www/cgi-bin (create this directory if it not exists).
#include "stdio.h"
 
int main(void) {
  printf( "Content-Type: text/plain\n\n" );
  printf("Hello world !\n");
  return 0;
}
Compile it typing:
debarm:~# gcc hello.c -o hello.cgi
Change the server.modules list inside /etc/lighttpd/lighttpd.conf in:
server.modules              = (
            "mod_access",
            "mod_cgi",
            "mod_alias",
            "mod_accesslog",
            "mod_compress",
)
and add these lines:
$HTTP["url"] =~ "/cgi-bin/" {
        cgi.assign = ( "" => "" )
}
cgi.assign      = (
        ".cgi"  => ""
)
Restart lighttpd typing:
debarm:~# /etc/init.d/lighttpd restart
Access with your browser to the FOX Board web page using this URL:
http:///cgi-bin/hello.cgi