From 3fed5de1b0b8b390e89b4c85cdceebcdb4560ebd Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 8 Nov 2018 17:44:41 +0100 Subject: Add lighttpd.conf Allows us to test the FastCGI script locally. Thanks to this article for describing how to set up a local FastCGI server with Lighttpd: http://yaikhom.com/2014/12/18/handling-requests-c-fast-cgi-and-lighttpd.html Found out how to get the current config directory using `var.CWD` from: https://stackoverflow.com/questions/11702989/lighttpd-conf-document-root-as-directory-containing-config-file/12435777#12435777 --- license-generator/lighttpd.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 license-generator/lighttpd.conf diff --git a/license-generator/lighttpd.conf b/license-generator/lighttpd.conf new file mode 100644 index 0000000..4fc6f2d --- /dev/null +++ b/license-generator/lighttpd.conf @@ -0,0 +1,17 @@ +var.log_root = "/usr/local/var/log/lighttpd" +var.server_root = "/usr/local/var/www" +server.document-root = server_root +server.port = 8080 +server.errorlog = log_root + "/error.log" + +server.modules += ( "mod_fastcgi" ) + +fastcgi.debug = 1 +fastcgi.server = ( + "/" => (( + "socket" => "./fcgi.socket", + "check-local" => "disable", + "bin-path" => var.CWD + "/target/debug/license-generator", + "max-procs" => 1 + )) +) -- cgit v1.2.3