[erlang-questions] inets: configuring both http and https

Ingela Andin ingela@REDACTED
Wed Nov 23 16:10:07 CET 2011


Hi!

Currently you need to have two httpd-service entries one running a
normal http server on one port and another running an https server on
another port.
In order to handle http and https on the same port you need to use the
SSL/TLS-upgrade mechanism that is supported by the erlang
SSL-application but
has not been utilized in inets yet.

Regards Ingela Erlang/OTP team -- Ericsson AB

2011/11/23 Joel Reymont <joelr1@REDACTED>:
> I would like to configure inets to handle both HTTP and HTTPS.
>
> My HTTP configuration (rebar, sys.config) is down below.
>
> Do I need to add an 'httpd1' entry to the services list and handle HTTPS or is there an easier way?
>
>        Thanks, Joel
>
> ---
>
>  %% Inets
>  {inets,
>  [{services,
>    [{httpd,
>      [{modules, [mod_alias, mod_auth, mod_esi, mod_actions,
>                  mod_cgi, mod_dir, mod_get, mod_head,
>                  mod_log, mod_disk_log]},
>       {port,8080},
>       {server_name,"http"},
>       {server_root,"/tmp"},
>       {document_root,"/tmp"},
>       {erl_script_alias, {"/", [request_handler]}},
>       {error_log, "error.log"},
>       {security_log, "security.log"},
>       {transfer_log, "transfer.log"},
>       {mime_types,
>        [{"html","text/html"},
>         {"css","text/css"},
>         {"js","application/x-javascript"}
>        ]}
>      ]}
>     ]}
>  ]}
>
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list