码迷,mamicode.com
首页 > 其他好文 > 详细

配置nginx状态信息虚拟主机

时间:2016-06-28 00:50:32      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:虚拟主机   信息   nginx   

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

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

   技术分享


本文出自 “sky9890” 博客,请务必保留此出处http://sky9896.blog.51cto.com/2330653/1793453

配置nginx状态信息虚拟主机

标签:虚拟主机   信息   nginx   

原文地址:http://sky9896.blog.51cto.com/2330653/1793453

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!