1、vim /var/named/chroot/var/named/hrsx.com.zone
加入一行:
* IN A 192.168.0.204
2、到apache服务器上,vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
setEnv APPLICATION_ENV testing
#ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot /www/cmstest/my120/public/
ServerName *.hrsx.com
ServerAlias *.hrsx.com
ErrorLog logs/taaat.mya2a0.com-error_log
CustomLog logs/taaat.mya1a20.com-access_log common
</VirtualHost>
注意:紫色这两行是关键。