栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

redhat-运维-(2)-selinux-no rout to host

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

redhat-运维-(2)-selinux-no rout to host

没有路由是常见问题,一般就两个原因:
1.防火墙没放行 服务+端口  firewalld-cmd
2.selinux安全设置 semanage 

1.web服务能提供/var/www/html下所有现有HTML文件
2.web为82上提供内容,非默认的80端口
3 在系统启动时自启动
 

#1.防火墙放行
 firewalld-cmd --add-port=82/tcp
 firewalld-cmd --add-service=http
#2.文本权限设置
  restorecon  -R /var/www/html/

#3.selinux设置
 setenforce 0
 semanage port -l|grep http
 semanage port -a -t http_port_t -p tcp 82
 setenforce 1
 systemctl restart httpd


#4.服务开机启动
systemctl status httpd
systemctl enable httpd --now
#status 结果 /usr/lib/systemd/system/httpd.service enable

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/307829.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号