云平台测试负载均衡Web服务器安装配置
1.关闭selinux.
2.安装httpd服务组件
3.配置httpd
3.1 修改配置文件:vi /etc/httpd/conf/httpd.conf
----------------------------------------------
#Listen 12.34.56.78:80
Listen 0.0.0.0:80
#ServerName www.example.com:80
ServerName localhost:80
--------------------------------
3.2 创建测试页面:vi /var/www/html/index.html
---------------------------
<H1 align="center">Hello !!!</H1>
<H2 algin="center">
This information comes from Ser:
<script>
document.write(window.location.host)
</script>
</H2>
-------------------------
4.添加80端口到防火墙:
#firewall-cmd --zone=public --add-port=80/tcp
5.启动httpd 服务:
#systemctl start httpd
#systemctl enable httpd