- if
( $host != 'www.59et.com' ){ - rewrite
^(.*)$ http://www.59et.com$1 permanent; - }
if^(^$host^!=^'www.59et.com'^){
[root@59et conf.d]# nginx -t the configuration file /opt/nginx/conf/nginx.conf syntax is ok configuration file /opt/nginx/conf/nginx.conf test is successful [root@59et conf.d]# nginx -s reload [root@59et conf.d]#