vi host.conf
server { listen 80; server_name www.xxx.cn xxx.cn; if ( $host !~* 'www.xxx.cn|xxx.cn' ) { return 403; } }