Chinaunix首页 | 论坛 | 博客
  • 博客访问: 368691
  • 博文数量: 100
  • 博客积分: 1894
  • 博客等级: 上尉
  • 技术积分: 951
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-11 23:17
文章分类

全部博文(100)

文章存档

2018年(3)

2014年(2)

2013年(7)

2012年(10)

2011年(8)

2010年(6)

2009年(63)

2008年(1)

分类: 系统运维

2010-07-27 15:32:35

1. download source package
 
 
2. prepare install
 
install pcre and pcre-devel package in your system.
 
3. install
 
  1) tar zxvf nginx-0.8.46.tar.gz
 
  2) ./configure --prefix=/usr/local/nginx --with-http_stub_status_module
 
  3) make
 
  4) make install
 
4. config
 
  1) vi /usr/local/nginx/conf/nginx.conf
 
     user  nobody nobody # run nginx user
     worker_connections  1024; # connection number
     
     location /NginxStatus {
          stub_status             on;
          access_log              on;
          auth_basic              "NginxStatus";
          auth_basic_user_file    htpasswd;
     } # monitor nginx status, these line must to add into server{}.
   2) htpasswd -c /usr/local/nginx/conf/htpasswd user
 

      # you can find "htpasswd" command from apache.

5. start and test

   1) run by below command

      /usr/local/nginx/sbin/nginx

   2) test

      A) input in web broswer. you can see "welcome to nginx!"

      B) input  in web broswer, and input the username and password. you can see below infomation.

---------------

Active connections: 1
server accepts handled requests
3 3 3
Reading: 0 Writing: 1 Waiting: 0
-----------------

It's all.

阅读(1416) | 评论(0) | 转发(0) |
0

上一篇:Python 下载

下一篇:RHEL5用ISO做yum源(FTP)

给主人留下些什么吧!~~