1、 安装httpd
yum install httpd.x86_64
2、设置开机启动和启动
1
2
3
systemctl start httpd
systemctl enable httpd
systemctl status httpd
3、配置/etc/httpd/conf/httpd.conf
在96行修改成 ServerName 192.168.1.109:80
IP地址需要根据不同的机器变化
重启 systemctl restart httpd
使用curl工具检查配置生效否,
curl http://localhost
如果看到有内容,说明配置生效
http://156.238.128.7