Phoenix prod env, specify bind address

i’m trying to bind my app address to, what i already do is changing config.exs, dev.exs, prod.exs to ip: {127, 0, 0, 1}

but when i deploy with command PORT=3001 MIX_ENV=prod mix phx.server my phoenix app always bind to [::]

How do i specify bind address for phoenix in production mode ?

How exactly have you done this?

config :dev_home, HomeWeb.Endpoint,
  http: [ip: {127, 0, 0, 1}, port: 4000],
  # other config

worked very well for me.

1 Like

i don’t know why, but i use phoenix 1.4.6 while my phoenix code are below 1.4.6

Either you use a certain version of phoenix or you don’t…

The version of the phx_new is not related to the version of phoenix you use in a project.

You can see the version of phoenix used in your project by doing cat mix.lock | grep \"phoenix\".

Aside of that, the syntax I have shown worked for me even with phoenix 1.2 IIRC.

So i init new phoenix app with --no-webpack

I’m not sure how this is related to the problem you described initially, nor how it would answer any of my previous questions…