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. Mac OS X 10.10 执行 Eclipse 提示须要安装 Java

  2. 会声会影X10 64位整合光盘V10.1.0.14简体中文版 下载

    http://xiazai.huishenghuiying.com.cn/wm/huishenghuiyingx10_64bit_wmqm.exe

  3. minic 词法单元建立

    #include <stdio.h> #include "symbol_table_def.h" //前面的那个词法和文法说明只是大概的说明,现在又有了改动,把指针运算 ...

  4. UIImagePickerController 视频录制操作,视频大小,时间长度

    一:使用 iOS 系统 UIImagePickerController 获取视频大小 获取视频长度 - (void)viewDidLoad { [super viewDidLoad]; // Do a ...

  5. UVa145 Gondwanaland Telecom

    Time limit: 3.000 seconds 限时:3.000秒 Problem 问题 Gondwanaland Telecom makes charges for calls accordin ...

  6. Unity AssetServer小笔记

    普及一下Asset Server知识: Unity的Asset Server,其实就是一个纯PostgreSQL数据库.Unity操作Asset Server,就是一个数据库客户端操作,但是Unity ...

  7. angular -- $resource 用法

    安装 ngResource模块是一个可选的angularjs模块,如果需要使用,我们要单独引用js <script type="text/javascript" src=&q ...

  8. BroadcastReceiver应用详解——广播

    转自:http://blog.csdn.net/liuhe688/article/details/6955668 BroadcastReceiver也就是“广播接收者”的意思,顾名思义,它就是用来接收 ...

  9. C++中返回对象的情形及RVO

    http://www.cnblogs.com/xkfz007/archive/2012/07/21/2602110.html 之前有文章介绍过临时对象和返回值优化RVO方面的问题.见此处. 在C++中 ...

  10. 03-spring学习-属性配置细节

    配置bean的一些细节 字面值 如果包含特殊符号,直接写会报错.可以用这个<![CDATA[]]>包裹起来. 比如这里的配置属性里面的value值包含<>等特殊符号,直接写会报 ...