socket_bind(): unable to bind address [99] (Ubuntu on Amazon EC2)

后端 未结 2 994
说谎
说谎 2021-01-14 22:17

I\'m trying to use Sockets on an EC2 Instance, but when I try to run the code I get the following error:

PHP Warning: socket_bind(): unable to bind a

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-14 22:43

    You cannot bind to the external IP, you have to bind to the internal IP, and setup a rule to allow that port so when they connect to the external IP and port, it gets redirected to the internal IP.

提交回复
热议问题