nginx常见错误

121 阅读1分钟

在CentOS7 启动nginx报错:

nginx: [emerg] bind() to 36.xx.xxx.xx:443 failed (99: Cannot assign requested address)

image.png

image.png

解决方式:
stackoverflow.com/questions/3…

image.png

编辑 /etc/sysctl.conf 文件

# allow processes to bind to the non-local address
# (necessary for apache/nginx in Amazon EC2)
net.ipv4.ip_nonlocal_bind = 1

然后重载 sysctl.conf

sysctl -p /etc/sysctl.conf