summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2014-05-05 15:59:03 +0200
committerLinus Nordberg <linus@nordberg.se>2014-05-05 15:59:03 +0200
commit53d2c054d021c194f758f347431e72b5fa5c0cf1 (patch)
treeec7dfe1777111ea7688a9413a70e59ad0a4f306a
parent6d6561a902f2352f8dc1b7a28c37694e71fade16 (diff)
Add config and app files.
-rw-r--r--ctls.config6
-rw-r--r--ebin/ctls.app9
-rw-r--r--httpd_props.conf20
-rwxr-xr-xsrc/ctls5
4 files changed, 35 insertions, 5 deletions
diff --git a/ctls.config b/ctls.config
new file mode 100644
index 0000000..adaad48
--- /dev/null
+++ b/ctls.config
@@ -0,0 +1,6 @@
+%% ctls configuration file (-*- erlang -*-)
+%% Start like this:
+%% $ erl -boot start_sasl -config ctls -run inets
+[{inets,
+ [{services,
+ [{httpd, [{proplist_file, "httpd_props.conf"}]}]}]}].
diff --git a/ebin/ctls.app b/ebin/ctls.app
new file mode 100644
index 0000000..eeaaf11
--- /dev/null
+++ b/ebin/ctls.app
@@ -0,0 +1,9 @@
+%% Application resource file for ctls (in -*- erlang -*- mode).
+%% Point out the proper configuration file (-config ctls) when starting beam.
+{application, ctls,
+ [{description, "ctls -- Certificate Transparency Log Server"},
+ {vsn, "0.0.1"},
+ {modules, [v1]},
+ {applications, [kernel, stdlib, plop, inets]}]}.
+%% {registered, [ctls]}]}.
+%% {mod, {ctls, ["test/eckey.pem", "test/eckey-public.pem"]}}]}.
diff --git a/httpd_props.conf b/httpd_props.conf
new file mode 100644
index 0000000..808be50
--- /dev/null
+++ b/httpd_props.conf
@@ -0,0 +1,20 @@
+[
+ {port, 8080},
+ {bind_address, {192, 168, 122, 119}},
+ {server_name, "flimsy.ct.nordu.net"},
+ {server_root, "/home/linus/usr/src/ct/ctls/webroot"},
+ {document_root, "/home/linus/usr/src/ct/ctls/webroot/docroot"},
+ {modules, [mod_alias, mod_auth, mod_esi, mod_get, mod_head,
+ mod_log, mod_disk_log]},
+ %%{re_write, {"^/ct/v1/(.*)$", "/ct/v1/https_server/\\1"}},
+ %%{script_re_write, {"^/ct/v1/(.*)_(.*)$", "/ct/v1/\\1-\\2"}},
+ {erl_script_alias, {"/ct", [v1]}},
+ {erl_script_nocache, true},
+ {error_log, "/home/linus/usr/src/ct/ctls/webroot/log/error"},
+ {security_log, "/home/linus/usr/src/ct/ctls/webroot/log/security"},
+ {transfer_log, "/home/linus/usr/src/ct/ctls/webroot/log/transfer"},
+ {socket_type,
+ {essl, % See ssl(3erl) for SSL options.
+ [{certfile, "/home/linus/usr/src/ct/ctls/webroot/certs/webcert.pem"},
+ {keyfile, "/home/linus/usr/src/ct/ctls/webroot/keys/webkey.pem"}]}}
+].
diff --git a/src/ctls b/src/ctls
deleted file mode 100755
index c3169b8..0000000
--- a/src/ctls
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /usr/bin/env escript
-
-main(_) ->
- io:format("Hello ctls!\n"),
- ctls:start().