Hello! I’m trying to deploy my phoenix app using releases with SSL. I am able to successfully get a release running locally (console outputs “Access MyAppWeb.Endpoint at https://localhost:4001”). However, when I try and actually load the page in a browser (Firefox), I get the following error message:
Secure Connection Failed
An error occurred during a connection to localhost:4001. PR_END_OF_FILE_ERROR
I cannot access the https site in any other browsers either. However, I am able to access the http version without any trouble.
I am testing locally using self-signed certificates. This works fine when running in development mode, but does not work when running a release.
The relevant section of my config/releases.ex file looks like this:
config :my_app, MyAppWeb.Endpoint,
server: true,
secret_key_base: secret_key_base,
url: [host: "localhost"],
http: [
port: 4000,
transport_options: [socket_opts: [:inet6]]
],
https: [
port: 4001,
otp_app: :my_app,
cipher_suite: :strong,
keyfile: System.get_env("SSL_KEY_PATH"),
certfile: System.get_env("SSL_CERT_PATH")
]
I would really like to try and get this running without having to use nginx. Any help would be greatly appreciated!