首页 > 服务器 > Dns服务器 > 正文

linux apache泛域名解析及dns相关

2019-10-13 18:23:53
字体:
来源:转载
供稿:网友

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>

注意:紫色这两行是关键。

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表