idiotbox-c-noapi

youtube scraping and interfaces: CGI, Gopher, CLI
Log | Files | Refs | README | LICENSE

README (833B)


      1 Dependencies:
      2 -------------
      3 
      4 - C compiler.
      5 - LibreSSL + libtls.
      6 
      7 
      8 Compile
      9 -------
     10 
     11 - make
     12 - doas make install
     13 
     14 
     15 Install HTTP CGI
     16 ----------------
     17 
     18 Nginx + slowcgi example:
     19 
     20 	location /idiotbox/css/.* {
     21 		root /home/www/domains/www.codemadness.org/htdocs/idiotbox/css;
     22 	}
     23 
     24 	location ~ ^/idiotbox(/|/\?.*)$ {
     25 		include /etc/nginx/fastcgi_params;
     26 		fastcgi_pass  unix:/run/slowcgi.sock;
     27 		fastcgi_param SCRIPT_FILENAME  /cgi-bin/idiotbox;
     28 		fastcgi_param SCRIPT_NAME  /cgi-bin/idiotbox;
     29 		fastcgi_param REQUEST_URI  /cgi-bin/idiotbox;
     30         }
     31 
     32 httpd + slowcgi example:
     33 
     34 	location match "/idiotbox" {
     35 		root "/cgi-bin/idiotbox.cgi"
     36 		fastcgi
     37 	}
     38 
     39 
     40 When using a chroot make sure to copy /etc/resolv.conf and /etc/ssl/cert.pem.
     41 
     42 To test from the command-line you can do:
     43 
     44 	QUERY_STRING="q=funny+cat+video" ./main | sed 1,2d | lynx -stdin