Articles
Software
Gallery
Other works
Contacts

#Lighttpd relative CGI example.html



            -lighttpd.conf
            {
                server.modules = (
                    "mod_cgi",
                    "mod_rewrite"
                )

                server.document-root = var.CWD
                server.port = 5050

                url.rewrite-once = (
                    "^/$" => "/ether.pl"
                )

                cgi.assign = (
                    ".pl" => "/usr/bin/perl"
                )
            }
            -ether.pl:
            {
                #!/usr/bin/perl

                print "Content-type: text/plain\n\n";
                print "Hello, World from ether.pl!";
            }
            $ lighttpd -D -f ./lighttpd.conf
            >and it just werks™