[root@kvm8 ~]# vim /etc/httpd/conf/httpd.conf <Directory "/var/www/virtual"> Order allow,deny <= 先查允許的主機,再查限制的主機 Allow from all <= 允許所有主機存取 /var/www/virtual </Directory>
[root@kvm8 ~]# vim /etc/httpd/conf/httpd.conf <Directory "/var/www/virtual"> Order deny,allow <= 先查拒絕的主機,再查允許的主機 </Directory>
[root@kvm8 ~]# vim /etc/httpd/conf/httpd.conf <Directory "/var/www/virtual"> Order allow,deny <= 先查允許的主機,再查限制的主機 Allow from kvm8.deyu.wang <= 只允許主機 kvm8.deyu.wang 存取 /var/www/virtual </Directory>
[root@kvm8 ~]# vim /etc/httpd/conf/httpd.conf <Directory "/var/www/virtual"> Order allow,deny <= 先查允許的主機,再查限制的主機 Allow from deyu.wang <= 只允許主機 kvm8.deyu.wang 存取 /var/www/virtual </Directory>
[root@kvm8 ~]# vim /etc/httpd/conf/httpd.conf <Directory "/var/www/virtual"> Order allow,deny <= 先查允許的主機,再查限制的主機 Allow from kvm8.deyu.wang kvm4.deyu.wang 存取 /var/www/virtual </Directory>