[error] Failed to start Ranch listener MyAppWeb.Endpoint.HTTP in :ranch_tcp:listen([:inet6, {:port, 80}]) for reason :eacces (permission denied)
[info] Application MyApp exited: MyApp.Application.start(:normal, []) returned an error: shutdown: failed to start child: MyAppWeb.Endpoint
** (EXIT) shutdown: failed to start child: Phoenix.Endpoint.Handler
** (EXIT) shutdown: failed to start child: {:ranch_listener_sup, MyAppWeb.Endpoint.HTTP}
** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup
** (EXIT) {:listen_error, MyAppWeb.Endpoint.HTTP, :eacces}
** (Mix) Could not start application MyApp: MyApp.Application.start(:normal, []) returned an error: shutdown: failed to start child: MyAppWeb.Endpoint
** (EXIT) shutdown: failed to start child: Phoenix.Endpoint.Handler
** (EXIT) shutdown: failed to start child: {:ranch_listener_sup, MyAppWeb.Endpoint.HTTP}
** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup
** (EXIT) {:listen_error, MyAppWeb.Endpoint.HTTP, :eacces}MyApp
my endpoint settings
load_from_system_env: true,
http: [port: {:system, “PORT”}],
url: [host: “xxxxx.eu-west-2.compute.amazonaws.com”, port: 80],
server: true,
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: [ ]
iex giving this error when listening to tcp
iex(1)> :gen_tcp.listen(443, [])
{:error, :eacces}
iex(2)> :gen_tcp.listen(80, [])
{:error, :eacces}
Os ubuntu 16
please help