Linux配置httpd服务

搭建httpd服务

配置环境:Centos7

1、首先安装httpd服务:

[[email protected] ~]# yum install httpd

2、配置Httpd服务

首先需要关闭防火墙,不然局域网内的主机无法访问:

[[email protected] ~]# systemctl disable firewalld.service
[[email protected] ~]# systemctl stop firewalld.service

然后开启httpd服务并设置开机启动:

[[email protected] ~]# systemctl enable httpd.service
[[email protected] ~]# systemctl starthttpd.service

基本上这样就可以了。

3、测试

在一台主机上输入安装httpd的主机ip地址,我这里是192.168.0.10,如果出现以下界面则配置成功:
Linux配置httpd服务