1. 安装Apache组件

[root@mycentos shell]# yum install httpd

2. 安装成功后,检测有无httpd进程

[root@mycentos shell]# ps -e |grep httpd

3. 如没有,启用该服务

[root@mycentos shell]# systemctl restart httpd.service

4. 使用浏览器访问本机IP地址,如果显示链接失败如下:

应该是防火墙相关设置问题导致.
5.关闭并禁用防火墙
[root@mycentos shell]# systemctl stop firewalld.service #停止防火墙服务
[root@mycentos Desktop]# systemctl disable firewalld.service #禁用防火墙开机启动服务
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
6.再次访问网站,能够成功登录

注意:如果你还是希望使用iptables来进行防火墙配置,记得一定要做下面设置:

[root@mycentos Desktop]# yum install iptables-services

[root@mycentos Desktop]# systemctl enable iptables

Centos7安装Apache Http服务器无法访问如何解决的更多相关文章

  1. CentOS7安装 Apache HTTP 服务器

    CentOS7安装 Apache HTTP 服务器 时间:2015-05-02 00:45来源:linux.cn 作者:linux.cn 举报 点击:11457次 不管你因为什么原因使用服务器,大部分 ...

  2. centos7安装apache http server启动失败--Failed to start The Apache HTTP Server.

    centos7安装apache http server启动失败     除了nginx可以开启http服务外,apche http server也可以开启http服务,安装过程如下:1. 首先,检测是 ...

  3. Centos7安装vsftpd (FTP服务器)

    Centos7安装vsftpd (FTP服务器) 原文链接:https://www.jianshu.com/p/9abad055fff6 TyiMan 关注 2016.02.06 21:19* 字数 ...

  4. 如何在Ubuntu 16.04上安装Apache Web服务器

    转载自:https://www.howtoing.com/how-to-install-the-apache-web-server-on-ubuntu-16-04 介绍 Apache HTTP服务器是 ...

  5. 如何在Ubuntu 18.04上安装Apache Web服务器

    一. apt库安装 1.在终端输入更新检查命令,sudo apt-get update 2. 在更新完成后(如果不想检查更新,也可直接输入此步)输入:sudo apt-get install apac ...

  6. centos6 / centos7 安装apache

    =================centos6.1 安装apache===================== 安装: yum -y install httpd 启动 /etc/init.d/htt ...

  7. [原]CentOS7安装Rancher2.1并部署kubernetes (三)---解决登录kubernets超时和部署测试Pod和Containter[nginx为例]

    ##################    Rancher v2.1.7  +    Kubernetes 1.13.4  ################ ##################### ...

  8. linux下安装Apache(https) 服务器证书安装配置指南

    一.  安装准备 1.    安装Openssl 要使Apache支持SSL,需要首先安装Openssl支持.推荐下载安装openssl-0.9.8k.tar.gz   下载Openssl:http: ...

  9. 解决CentOS7安装Tomcat不能被外部访问的问题

    在CentOS7安装了Tomcat,在服务器内部使用火狐浏览器通过localhost:8080是可以访问的,但是不能被外部访问,主要原因是因为防火墙的存在,导致端口不能被访问.CentOS是使用fir ...

随机推荐

  1. idea启动dubbo

    jetty 方式启动dubbo. 首先为dubbo 添加jetty mven 插件: http://www.eclipse.org/jetty/documentation/current/jetty- ...

  2. mac本地搭建wordpress

    1 下载安装最新的xampp 2 安装完成后,使用下面的命令开始运行 XAMPP.在终端下以系统管理员 root 的身份登录 管理员root身份登录 sudo su 使用命令启动XAMPP /Appl ...

  3. 网页图表控件Highcharts选项配置参数

    Highcharts提供大量的选项配置参数,您可以轻松定制符合用户要求的图表,目前官网只提供英文版的开发配置说明文档,而中文版的文档网上甚少,且零散不全.这里,我把Highcharts常用的最核心的参 ...

  4. google 访问技术

    空闲时间提供一些关于google访问的技术分享及技术支持. 不卖产品,请不要询问. 探讨技术请加群.

  5. VS报表图解《一》---菜鸟版

    与原先的开发环境VB.EXE不同VS2013自带了报表控件ReportViewer能够内部实现报表的设计,本文主要通过绑定数据集来实现报表的显示 1.加入:reportviewer控件,当将控件显示在 ...

  6. 在LoadRunner中查找和替换字符串

    参考<Search & Replace function for LoadRunner>: http://ptfrontline.wordpress.com/2009/03/13/ ...

  7. ionicframework(一)

    官方网站    http://ionicframework.com 然后在Get Start里面可以了解到,安装Ionic需要安装 Node.js. 文件来源 http://www.tuicool.c ...

  8. expect脚本免密码

    #!/usr/bin/expect set timeout spawn ssh root@20.0.102.19 expect "password:" send "123 ...

  9. thinkphp 编辑器kindeditor

    首先,去官网下载最新版的kindeditor,然后把里面asp,jsp,net,example的全删除,然后改名为editor放进public(最外层目录的public)文件夹里面 在目录lib目录建 ...

  10. Linux命令-网络命令:ifconfig

    ifconfig 查看本机的网卡信息.eth是linxu真实的网卡,多块网卡从零开始,eth0,eth1. ifconfig eth0 192.168.67.5 设置临时网络IP地址