-------------------------------------------------nginx rewrite------------------------------------------
[root@localhost ~]# iptables -F
[root@localhost ~]# setenforce 0
[root@localhost ~]# rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
[root@localhost ~]# yum install nginx -y
[root@localhost ~]# yum install bind -y
[root@localhost ~]# vim /etc/named.conf
[root@localhost ~]# vim /etc/named.rfc1912.zones
[root@localhost ~]# cd /var/named/
[root@localhost named]# cp -p named.localhost kgc.com.zone
[root@localhost named]# vim kgc.com.zone
[root@localhost named]# cp -p kgc.com.zone newkgc.com.zone
[root@localhost named]# systemctl start named
[root@localhost named]# vim /etc/nginx/conf.d/default.conf
[root@localhost named]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
[root@localhost named]# systemctl start nginx
[root@localhost named]# vim /etc/nginx/conf.d/default.conf
[root@localhost named]# cd /usr/share/nginx/html/
[root@localhost html]# vim error.html
[root@localhost html]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@localhost html]# systemctl restart nginx
[root@localhost html]# vim /etc/nginx/conf.d/default.conf
[root@localhost html]# vim /var/named/kgc.com.zone
[root@localhost named]# vim /etc/nginx/conf.d/default.conf
[root@localhost named]# systemctl restart nginx
[root@localhost named]# vim /etc/nginx/conf.d/default.conf
[root@localhost named]# systemctl restart nginx
[root@localhost named]# vim /etc/nginx/conf.d/default.conf
[root@localhost named]# systemctl restart nginx