I found this page on erlanganswers.com which said to use setcap on Linux > 2.6.24. Unfortunately this didn't work. After clearing the hair off my keyboard, Running "netstat -ptl" while temporarily serving https on port 8080 showed me that beam was not doing the listening, but ssl_esock.
setcap "cap_net_bind_service=+ep" /usr/lib64/erlang/lib/ssl-3.10.8/priv/bin/ssl_esock
No need to setcap any other file except this one.
Below is a "443.conf" file that configures inets httpd to serve https only. Look at my previous post on starting inets http server for the commands to start it.
[
{modules, [
mod_alias,
mod_auth,
mod_esi,
mod_actions,
mod_cgi,
mod_dir,
mod_get,
mod_head,
mod_log,
mod_disk_log
]},
{port,443},
{server_name,"localhost.localdomain"},
{server_root,"log"},
{document_root,"secure"},
{erl_script_alias, {"/test", [test]}},
{socket_type, ssl},
{ssl_certificate_file, "localhost.pem"},
{error_log, "error.log"},
{security_log, "security.log"},
{transfer_log, "transfer.log"},
{mime_types,[
{"html","text/html"},
{"css","text/css"},
{"js","application/x-javascript"}
]}
].
No comments:
Post a Comment