diff options
-rw-r--r-- | etc/lighttpd.conf | 56 | ||||
-rw-r--r-- | units/http-daemon.service | 7 | ||||
-rw-r--r-- | units/lighttpd.service | 7 | ||||
-rw-r--r-- | units/morph-cache-server-write-interface.service | 7 | ||||
-rw-r--r-- | units/morph-cache-server.service | 7 |
5 files changed, 63 insertions, 21 deletions
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, + ) + ) + ) +} diff --git a/units/http-daemon.service b/units/http-daemon.service deleted file mode 100644 index bd08f04..0000000 --- a/units/http-daemon.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=HTTP Daemon for Trove -After=network.target - -[Service] -ExecStart=/usr/sbin/httpd -u git:git -h /var/www/htdocs -f -Restart=always diff --git a/units/lighttpd.service b/units/lighttpd.service new file mode 100644 index 0000000..589a595 --- /dev/null +++ b/units/lighttpd.service @@ -0,0 +1,7 @@ +[Unit] +Description=Lighttpd Web Server +After=network.target + +[Service] +ExecStart=/usr/sbin/lighttpd -f /etc/lighttpd.conf -D +Restart=always diff --git a/units/morph-cache-server-write-interface.service b/units/morph-cache-server-write-interface.service deleted file mode 100644 index 684a040..0000000 --- a/units/morph-cache-server-write-interface.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Morph cache server (write interface) -After=network.target - -[Service] -ExecStart=/bin/su -c '/usr/bin/morph-cache-server --config=/etc/morph-cache-server-write.conf' - cache -Restart=always diff --git a/units/morph-cache-server.service b/units/morph-cache-server.service deleted file mode 100644 index f1f2385..0000000 --- a/units/morph-cache-server.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Morph cache server -After=network.target - -[Service] -ExecStart=/bin/su -c /usr/bin/morph-cache-server - cache -Restart=always |