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
本文详细介绍了如何在Linux环境下安装Apache HTTP Server,并通过示例步骤展示如何设置其开机启动,修改配置文件实现特定IP地址的服务绑定,以及如何验证配置是否生效。
890

被折叠的 条评论
为什么被折叠?



