cgi run c code on webpage cd /var/www mkdir cgi-bin chmod 777 * cd cgi-bin nano hello.c ------------------------ #include "stdio.h" int main(void) { printf( "Content-Type: text/plain\n\n" ); printf("Hello world !\n"); return 0; } ------------------------ gcc hello.c -o hello.cgi this makes .cgi file nano /etc/lighttpd/lighttpd.conf ------------------------- $HTTP["url"] =~ "/cgi-bin/" { cgi.assign = ( "" => "" ) } cgi.assign = ( ".cgi" => "" ) ------------------------- /etc/init.d/lighttpd restart http://192.168.0.6/cgi-bin/hello.cgi works!