1.案例一
需求:本例要求为 http://server0.example.com 配置Web站点,要求如下:
1.从http://ldap.example.com/pub/example.html下载一个主页文件,将其重命名为 index.html
2.将此文件拷贝到站点的 DocumentRoot 目录下,不要对文件 index.html 的内容作任何修改
3.来自my133t.org的客户端的访问会被拒绝
1.1方案步骤
[root@server0 ~]# yum -y install httpd
[root@server0 ~]# cd /var/www/html/
[root@server0 html]# wget http://classroom.example.com/pub/example.html
[root@server0 html]# mv example.html index.html
[root@server0 html]# systemctl start httpd
[root@server0 html]# systemctl start httpd
[root@server0 html]# systemctl enable httpd
[root@server0 html]# systemctl mask iptables.service ebtables.service
[root@server0 html]# systemctl stop iptable ebtables
[root@server0 html]# firewall-cmd --add-rich-rule 'rule family=ipv4 source address=172.25.0.0/24 service name=http accept' --permanent
[root@server0 html]# firewall-cmd --reload
1.2验证结果
2.案例二
需求为站点 http://server0.example.com 配置TLS加密需求如下
1.一个已签名证书从以下地址获取 http://classroom.example.com/pub/server30.crt
2.此证书的密钥从以下地址获取 http://lclassroom.example.com/pub/server30.key
3.此证书的签名授权信息