2008
07.11

简单的说,其实没啥差别,关键的一点,记住下面几个Nginx的Flags:
last – 基本上都用这个Flag。
break – 中止Rewirte,不在继续匹配
redirect – 返回临时重定向的HTTP状态302
permanent – 返回永久重定向的HTTP状态301

另外,有个东西很关键,曾经折腾我好几个小时才搞定,就是Nginx里面配置 {m,n} 这样的正则规则的时候,条件必须加上双引号,否则总是报错无法通过,官方文档里面真是很难找到这些东西,很晕。

4 comments so far

Add Your Comment
  1. finalbsd on July 11, 2008 at 9:02 am  

    (Quote)
    said:

    不错,Michael这个经验值得分享,虽然我用Nginx和Lighttp不多,呵呵,我绝大部分服务器…

    放心使用吧,youtube使用的是lighttpd,毫无问题,国内外若干网站使用着,Nginx经过实际测试,不会比lighttpd差,都可以放心使用,从我的经验来看,都比apache好使 :) 也许是因为我对apache 掌握不够透彻才有此片面的看法。

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word