summaryrefslogtreecommitdiff
path: root/src/https_server.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/https_server.erl')
-rw-r--r--src/https_server.erl50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/https_server.erl b/src/https_server.erl
deleted file mode 100644
index 465d77b..0000000
--- a/src/https_server.erl
+++ /dev/null
@@ -1,50 +0,0 @@
-%%% Copyright (c) 2014, NORDUnet A/S.
-%%% See LICENSE for licensing information.
-
--module(https_server).
--export([start/0, stop/1]).
-
-start() ->
- io:format("Starting https server~n"),
- case code:ensure_loaded(jiffy) of
- {module, jiffy} -> ok;
- _ -> io:format("missing jiffy -- please add to load path~n")
- end,
- %% TODO: put this in httpd_props.conf and use that at erlang
- %% start. inets:start(httpd, {proplist_file, "httpd_props.conf"}).
- ServerRoot = "/home/linus/usr/src/ct/catlfish/webroot",
- {ok, Pid} =
- inets:start(httpd,
- [{port, 8080},
- %%{bind_address, {127,0,0,1}},
- {bind_address, {192, 168, 122, 119}},
- {server_name, "flimsy.ct.nordu.net"},
- {server_root, ServerRoot},
- {document_root, ServerRoot ++ "/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"}},
- {re_write, {"^/ct/v1/(.*)_(.*)$", "/ct/v1/\\1-\\2"}},
- {erl_script_alias, {"/ct", [v1]}},
- {erl_script_nocache, true},
- {error_log, "log/error"},
- {security_log, "log/security"},
- {transfer_log, "log/transfer"},
- %% See ssl(3erl) for SSL options.
- {socket_type, {essl, [
- {certfile, ServerRoot ++ "/certs/webcert.pem"},
- {keyfile, ServerRoot ++ "/keys/webkey.pem"},
- %%{cacertfile, ServerRoot ++ "/certs/cacert.pem"},
- {ciphers, ssl:cipher_suites()},
- {verify, verify_none}
- ]}}
- ]),
- Pid.
-
-stop(Pid) ->
- inets:stop(httpd, Pid).