View Source CertMagex (CertMagex v1.1.0)

Automatic SSL certs from Let's Encrypt for your Phoenix applications.

Installation

For Cowboy add to your prod.exs:

config <your_app>, <your_endpoint>,
  # ATTENTION: Ensure you comment http: out and port 80 is free!
  https: [port: 443, sni_fun: &CertMagex.sni_fun/1],
  ...

For Bandit add to your prod.exs:

config <your_app>, <your_endpoint>,
  # ATTENTION: Ensure you comment http: out and port 80 is free!
  https: [port: 443, thousand_island_options: [transport_options: [sni_fun: &CertMagex.sni_fun/1]]],
  ...

Summary

Functions

Insert a certificate into the cache. Automatically detects all domains in the certificate.

Insert a certificate into the cache for a specific domain.

The SNI function to be used in your Phoenix or Cowboy configuration. E.g. for Cowboy add this to your prod.exs

Functions

Link to this function

insert(cert_priv_key, public_cert)

View Source

Insert a certificate into the cache. Automatically detects all domains in the certificate.

Link to this function

insert(domain, cert_priv_key, public_cert)

View Source

Insert a certificate into the cache for a specific domain.

The SNI function to be used in your Phoenix or Cowboy configuration. E.g. for Cowboy add this to your prod.exs:

config <your_app>, <your_endpoint>,
  # ATTENTION: Ensure you comment http: out and port 80 is free!
  https: [port: 443, sni_fun: &CertMagex.sni_fun/1],
  ...