nginx简介及简单使用

Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server.Igor Sysoevstarted development of Nginx in 2002, with the first public release in 2004. Nginx now hosts nearly12.18% (22.2M)of all domains worldwide. As Netcraft predicted, Nginx now surpasses Microsoft IIS as the second most popular web server.

Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

Nginx is one of a handful of servers written to address theC10K problem. Unlike traditional servers, Nginx doesn't rely on threads to handle requests. Instead it uses a much more scalable event-driven (asynchronous) architecture. This architecture uses small, but more importantly,predictableamounts of memory under load.
Even if you don't expect to handle thousands of simultaneous requests, you can still benefit from Nginx's high-performance and small memory footprint. Nginx scales in all directions: from the smallest VPS all the way up to clusters of servers.

Nginx powers several high-visibility sites, such asWordPress,Hulu,Github,Ohloh,SourceForge,WhitePagesandTorrentReactor.


下面开始介绍下nginx的下载、安装及简单使用:

1、下载:

2011年4月12日 nginx 最新Windows版程序下载地址:

http://nginx.org/download/nginx-1.0.0.zip

2、安装:

使用上面的下载地址下载得到一ZIP压缩包,解压得到nginx-1.0.0文件夹。

例如解压到D:\nginx\

3、简单使用:

首先编辑nginx文件夹内conf文件夹里的nginx.conf,修改端口:

例如可修改listen 8080,即为设置默认访问端口为8080.

然后在CMD(命令提示符)中切换工作目录到D:\nginx

接着输入:start nginx ,并回车。

如果防火墙弹出提示,请允许通过。

接下来打开浏览器,访问http://127.0.0.1:8080,

如果页面显示“Welcome to nginx!”,那就运行成功了。

这个页面在nginx的html目录下。

更高级的功能配置请参考nginx官方WIKI:http://wiki.nginx.org/

nginx中文WIKI:http://wiki.nginx.org/NginxChs


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值