From a9341227068996fdbde2bd4da92ee491e8bfbeea Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Wed, 4 Sep 2013 17:37:53 +0100 Subject: Use lighttpd for the trove http services. - Add a configuration file to lighttpd. The max-procs for the read-only cache server is bigger than the writable cache server, as is expected to have a bigger load. Although the max-procs set is low, each fastcgi process supports multiple connections, that accordingly flup source code is equal to the maximum number of open file descriptors that a process can have. - Remove morph-cache-server systemd units. The servers will be spawned by lighttpd as fcgi processes. - Make cgit to be served by lighttpd instead of busybox httpd. --- etc/lighttpd.conf | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 etc/lighttpd.conf (limited to 'etc') diff --git a/etc/lighttpd.conf b/etc/lighttpd.conf new file mode 100644 index 0000000..a69407f --- /dev/null +++ b/etc/lighttpd.conf @@ -0,0 +1,56 @@ +server.document-root = "/var/www/htdocs" + +server.port = 80 + +server.username = "git" +server.groupname = "git" + +server.modules += ("mod_cgi", "mod_fastcgi") + +index-file.names = ("index.html") + +cgi.assign = ("cgit.cgi" => "") + +mimetype.assign = ( + ".html" => "text/html", + ".txt" => "text/plain", + ".jpg" => "image/jpeg", + ".png" => "image/png", + ".css" => "text/css" +) + + +$SERVER["socket"] == ":8080" { + server.username = "cache" + server.groupname = "cache" + fastcgi.server = ( + "" => + ( + "python-fcgi" => + ( + "socket" => "/var/run/lighttpd/morph-cache-server.socket", + "bin-path" => "/usr/bin/morph-cache-server --config=/etc/morph-cache-server.conf", + "check-local" => "disable", + "max-procs" => 4, + ) + ) + ) +} + + +$SERVER["socket"] == ":8081" { + server.username = "cache" + server.groupname = "cache" + fastcgi.server = ( + "" => + ( + "python-fcgi" => + ( + "socket" => "/var/run/lighttpd/morph-cache-server-write.socket", + "bin-path" => "/usr/bin/morph-cache-server --config=/etc/morph-cache-server-write.conf", + "check-local" => "disable", + "max-procs" => 1, + ) + ) + ) +} -- cgit v1.2.1