虚拟主机DocumentRoot不被更改

不要以为我的虚拟主机工作正常。 这就是我在httpd.conf里面的内容……这是文件中的最后一件事情:

NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/html/testing ServerName testing.aa.local </VirtualHost> 

在我的/ etc / hosts文件中:

 127.0.0.1 testing.aa.local 

现在,当我去tests.aa.local它显示该网站的根的索引页。 在httpd.conf中,文档根目录是DocumentRoot /var/www/html 。 它似乎是采取该文件的根,而不是VirtualHost documentroot。 当我重新启动httpd没有错误。 当我说httpd -S它说:

 $ sudo /usr/sbin/httpd -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: _default_:443 aa.local (/etc/httpd/conf.d/ssl.conf:81) *:* aa.local (/etc/httpd/conf/httpd.conf:974) *:80 is a NameVirtualHost default server testing.aa.local (/etc/httpd/conf/httpd.conf:1031) port 80 namevhost testing.aa.local (/etc/httpd/conf/httpd.conf:1031) Syntax OK 

任何人都明白为什么当我去testing.aa.local它显示我的/ var / www / html的索引页而不是/ var / www / html / testing? 同样,/ var / www / html被定义为DocumentRoot的httpd.conf文件,但后来我声明了虚拟主机容器,所以我认为它应该覆盖它?

在我的httpd.conf文件中有一个虚拟主机容器都准备好了。 我评论说,它现在的作品。