PHP 配置文件设置监听端口出现报错:
httpd Server not started: (13)Permission denied: make_sock: could not bind to address [::]:88
配置文件:/etc/httpd/conf/httpd.conf
由于缺少SELinux
权限,默认情况下,SELinux
仅允许apache / httpd
绑定到以下端口:
80, 81, 443, 488, 8008, 8009, 8443, 9000
因此,结合我httpd.conf
监听 88 端口将失败。
要解决问题,我必须在系统的SELinux
配置中添加端口88
:
- 安装
semanage
工具:sudo yum -y install policycoreutils-python
- 允许端口
88
使用httpd
:sudo semanage port -a -t http_port_t -p tcp 88