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. [Tools] Unlock TypeScript's Features in Vanilla JS with @ts-check and JSDoc

    TypeScript can help you with your plain JavaScript files if you add a simple //@ts-check comment. Th ...

  2. Win7文件正在使用无法删除怎么办

    Windows 7下删除文件提示被占用?系统内置工具搞定 Windows7之家(www.win7china.com):Windows7下删除文件提示被占用?系统内置工具搞定 在Windows中,删除文 ...

  3. C# 5 in a Nutshell - Delegate

    1. What is delegate in C#? A delegate is an object that knows how to call a method.A delegate type d ...

  4. Android开发调试常用命令列表

    Android开发调试常用命令列表 adb命令 am am start -n com.iflytek.autofly.account/.ui.MainActivity am start -n com. ...

  5. 运用JMX监控Tomcat

    1.先配Tomcat的启动语句,window下tomcat的bin/catalina.bat(linux为catalina.sh),在头上注释部分(.bat为rem..sh为#)后面加上set JAV ...

  6. 用rz,sz命令在windows和linux之间传输文件(转)

    转自http://www.linuxmine.com/178.html有很多人没有听说过ZModem协议,更不知道有rz/sz这样方便的工具: 下面一段是从SecureCRT的帮助中copy的: ZM ...

  7. winfrom cahce 问题

    .Clear()不能随便用 .Clear()的比较没有什么意思,因为只是把DataTable清空而已,在堆中任然分配内存,一般要比较也是比较Close()方法,不过DataTable没有这个方法 至于 ...

  8. Python vs Ruby: 谁是最好的 web 开发语言?

    Python 和 Ruby 都是目前用来开发 websites.web-based apps 和 web services 的流行编程语言之一. 这两种语言在许多方面有相似之处.它们都是高级的面向对象 ...

  9. java基础讲解07-----数组

    1.什么是数组 2.怎么使用数组 package test; public class ShuZu {            public static void main(String[] args ...

  10. 纯div+css制作的弹出菜单

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...