2.2 configuration: Order deny,allow Deny from all 2.4 configuration: Require all denied
2.2 configuration: Order allow,deny Allow from all 2.4 configuration: Require all granted
2.2 configuration: Order Deny,Allow Deny from all Allow from deyu.wang 2.4 configuration: Require host deyu.wang
Require ip 10.1.2.3 Require ip 192.168.1.140 192.168.1.141
Require ip 10.1 Require ip 10 172.20 192.168.2
Require ip 10.1.0.0/255.255.0.0
Require ip 10.1.0.0/16
[root@kvm5 ~]# vim /etc/httpd/conf/httpd.conf <Directory "/var/www/virtual"> Require host kvm5.deyu.wang </Directory>
[root@kvm5 ~]# systemctl reload httpd.service [root@kvm5 ~]# curl http://kvm5.deyu.wang kvmweb [root@kvm5 ~]# curl http://www5.deyu.wang virtaul test
[root@dywH ~]# curl http://kvm5.deyu.wang kvmweb [root@dywH ~]# curl http://www5.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"> ..................... </div> </body></html>