[root@kvm5 ~]# yum install httpd -y
[root@kvm5 ~]# wget http://dywang.csie.cyut.edu.tw/materials/web.html -O /var/www/html/index.html
[root@kvm5 ~]# vim /etc/httpd/conf/httpd.conf
[root@kvm5 ~]# grep deyu.wang -A1 -B25 /etc/httpd/conf/httpd.conf | \
egrep -v '(#|^$)'
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
#Require host deyu.wang
Require ip 192.168.122
</Directory>
[root@kvm5 ~]# systemctl enable httpd.service ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service' [root@kvm5 ~]# systemctl start httpd
[root@dywH ~]# curl http://kvm5.deyu.wang curl: (7) couldn't connect to host
[root@kvm5 ~]# firewall-cmd --permanent --add-service=http --add-service=https success [root@kvm5 ~]# firewall-cmd --reload success
[root@kvm5 ~]# firewall-cmd --list-all public (default) interfaces: sources: services: dhcpv6-client http https ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules:
[root@dywH ~]# curl http://kvm5.deyu.wang web test
[root@dywIssd ~]# ifconfig virbr0:1 192.168.111.1 up
[root@dywIssd ~]# curl --interface 192.168.111.1 http://kvm5.deyu.wang/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Apache HTTP Server Test Page powered by CentOS</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Bootstrap -->
<link href="/noindex/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="noindex/css/open-sans.css" type="text/css" />
..................................
</body></html>