文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Nginx 基本安装和配置

Nginx 基本安装和配置

时间:2010-07-27  来源:wwyhy

1. download source package   http://nginx.org/en/download.html   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 http://IP in web broswer. you can see "welcome to nginx!"

      B) input http://IP/NginxStatus 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.

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载