修改httpd端口后 无法启动

发布时间 2023-06-28 15:19:45作者: sprr

修改了httpd端口后 启动失败,查了下 也不是端口占用

其实是 SeLinux端口标签中不存在我们要修改的端口

可以用下面的命令去检查

semanage port -l               #查看所有端口标签 
semanage port -l | grep 8802   #查看8802端口标签

提示 semanage command not found
直接下载 就行了 yum install policycoreutils-python -y
将需要的端口加进去

semanage port -a -t http_port_t -p tcp port

最后在重启

systemctl restart httpd