当前位置: 首页 > news >正文

红帽Linux网页访问问题

配置网络,手动配置
搭建yum仓库红帽Linux网页访问问题
下载httpd

网页访问问题:首先看httpd的状态---selinux的工作模式(强制)---上下文类型(semanage-fcontext)---selinux端口有没有放行semanage port
---防火墙有没有active---防火墙有没有放行对应端口---httpd(是否重启服务)

[root@workstation ~]# systemctl  status  httpd.service(确保httpd服务正常开启)
[root@workstation ~]# getenforce(查看selinux模式)
[root@workstation html]# ls -Z(查看文件上下文类型是否正确)
unconfined_u:object_r:httpd_sys_content_t:s0 file1
unconfined_u:object_r:httpd_sys_content_t:s0 index.html

开放selinux端口
[root@workstation html]# semanage  port  -l  | grep http
[root@workstation html]# man semanage-port
[root@workstation html]# semanage port -a -t http_port_t -p tcp 5555
[root@workstation html]# semanage  port  -l  | grep http

开放防火墙端口
[root@workstation html]# man firewall-cmd
[root@workstation html]# firewall-cmd --permanent --add-port=5555/tcp
success
[root@workstation html]# firewall-cmd  --reload 
success

开放httpd配置文件的端口
[root@workstation html]# vim  /etc/httpd/conf/httpd.conf 
[root@workstation html]# cat   /etc/httpd/conf/httpd.conf  | grep  Listen 
#Listen 12.34.56.78:80
#Listen 80
Listen  5555

重启httpd服务
[root@workstation html]# systemctl  restart  httpd.service 
[root@workstation html]# systemctl  enable  httpd.service

相关文章:

  • 【工具变量】1907年大清邮政舆图数据集(高清图+PDF)
  • confluent-kafka入门教程
  • Windows 下 MongoDB ZIP 版本安装指南
  • 【Linux系统篇】:从匿名管道到命名管道--如何理解进程通信中的管道?
  • 《如何结合XMind和DeepSeek高效生成思维导图》
  • Obsidian 文件夹体系构建 -INKA
  • 华为OD机试真题—— 最少数量线段覆盖/多线段数据压缩(2025A卷:100分)Java/python/JavaScript/C++/C语言/GO六种最佳实现
  • 网工_传输层协议概述
  • 无感改造,完美监控:Docker 多阶段构建 Go 应用无侵入观测
  • 【ES6新特性】Proxy进阶实战
  • 第IV部分有效应用程序的设计模式
  • 驱动速腾雷达16线并用rviz显示点云
  • C++进程间通信开发实战:高效解决项目中的IPC问题
  • 【c语言基础学习】qsort快速排序函数介绍与使用
  • 3D开发工具HOOPS助力Hexagon智能制造突破技术瓶颈,重塑测量软件用户体验!
  • 算法——置换与排列【基础】
  • LVGL Video控件和Radiobtn控件详解
  • 【无标题】Spark-SQL编程(2)
  • 玩转Docker | 使用Docker部署Xnote笔记工具
  • 从Gradio App创建Discord Bot/Slack Bot/Website Widget(2)——从Gradio App创建Slack Bot
  • 11家券商一季度净利翻番:9家利润超20亿,国泰海通居首
  • 深交所修订创业板指数编制方案,引入ESG负面剔除机制
  • 五大国货美妆去年业绩分化:珀莱雅百亿营收领跑,上海家化转亏
  • 北京银行一季度净赚超76亿降逾2%,不良贷款率微降
  • 何立峰出席驻沪中央金融机构支持上海建设国际金融中心座谈会并讲话
  • 卡尼领导的加拿大自由党在联邦众议院选举中获胜