[root@NFS-Serverextra]# cat>>nginx_vhosts.conf<

server

{

 listen 80;

 server_name status.etiantian.org;

 location /{

 stub_status on;

 access_log off;

  }

}

EOF

[root@NFS-Serverconf]# ../sbin/nginx -t

nginx: theconfiguration file /application/nginx-1.10.1/conf/nginx.confsyntax is ok

nginx:configuration file /application/nginx-1.10.1/conf/nginx.conftest is successful

[root@NFS-Serverconf]# ../sbin/nginx -s  reload

[root@NFS-Serverconf]# netstat -lnt  #或者 netstat -lnt|grep 80

Active Internetconnections (only servers)

Proto Recv-QSend-Q Local Address              Foreign Address            State     

tcp        0     0 0.0.0.0:892             0.0.0.0:*                   LISTEN     

tcp        0     0 0.0.0.0:2049                0.0.0.0:*                   LISTEN     

tcp        0     0 0.0.0.0:32803               0.0.0.0:*                   LISTEN     

tcp        0     0 127.0.0.1:199               0.0.0.0:*                   LISTEN     

tcp        0     0 0.0.0.0:875                 0.0.0.0:*                  LISTEN     

tcp        0     0 0.0.0.0:111                 0.0.0.0:*                   LISTEN     

tcp        0     0 0.0.0.0:80                  0.0.0.0:*                   LISTEN     

tcp        0     0 0.0.0.0:22                  0.0.0.0:*                   LISTEN     

tcp        0     0 0.0.0.0:59448               0.0.0.0:*                   LISTEN     

tcp        0     0 :::892                     :::*                        LISTEN     

tcp        0     0 :::2049                     :::*                        LISTEN     

tcp        0     0 :::32803                   :::*                        LISTEN     

tcp        0     0 ::ffff:127.0.0.1:8005      :::*                        LISTEN     

tcp        0     0 :::8009                    :::*                       LISTEN     

tcp        0     0 :::57707                   :::*                        LISTEN     

tcp        0     0 :::111                     :::*                        LISTEN     

tcp        0     0 :::8080                     :::*                        LISTEN     

tcp        0     0 :::22                      :::*     

hosts文件中解析了status.etinantian.org

192.168.47.133 www.etiantian.org  bbs.etiantian.org  blog.etiantian.org etiantian.org

192.168.47.133 status.etiantian.org

   配置nginx状态信息虚拟主机_第1张图片