[99s-extend] Cowboy HTTPS Issue

Loïc Hoguin essen at ninenines.eu
Tue Jul 23 15:41:42 CEST 2013


You need to include and start the public_key and ssl applications.

On 07/23/2013 03:12 PM, Lee Sylvester wrote:
> Hi guys,
>
> So, I'm trying to run Cowboy with SSL, but keep getting an error with the SSL module:
>
> application: ssl
>      exited: {bad_return,
>                  {{ssl_app,start,[normal,[]]},
>                   {'EXIT',
>                       {undef,
>                           [{ssl_app,start,[normal,[]],[]},
>                            {application_master,start_it_old,4,
>                                [{file,"application_master.erl"},
>                                 {line,274}]}]}}}}
>      type: temporary
>
>
> The way I'm starting Cowboy is like this:
>
> 	Env = [
> 		{env, [{dispatch, Dispatch}]},
> 		{onrequest, fun http_utils:set_request_cors/1}
> 	],
>
> 	case http_server:is_secure() of
> 		true ->
> 			cowboy:start_https(https, 100, [
> 				{ip, Ip}, {port, Port},
> 				{certfile, binary_to_list(http_server:secure_cert())},
> 				{keyfile, binary_to_list(http_server:secure_key())},
> 				{reuseaddr, true},
> 				{fail_if_no_peer_cert, true}
> 			], Env);
> 		_ ->
> 			{ok, _} = cowboy:start_http(http, 100, Options, Env)
> 	end,
>
> Does anyone know why I might be getting this issue?
>
> Thanks,
> Lee
>
>
> _______________________________________________
> Extend mailing list
> Extend at lists.ninenines.eu
> http://lists.ninenines.eu:81/listinfo/extend
>


-- 
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu



More information about the Extend mailing list