首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

nginx惯用配置与操作

2012-10-20 
nginx常用配置与操作rewrite有rewrite日志可以打开!# last表示rewrite之后还会重新请求location / {# mat

nginx常用配置与操作
rewrite有rewrite日志可以打开!
# last表示rewrite之后还会重新请求

location  = / {                                                                                                                                         # matches the query / only.                                                        [ configuration A ]-                                                             }                                                                                  location  / {                                                                        # matches any query, since all queries begin with /, but regular                   # expressions and any longer conventional blocks will be                           # matched first.                                                                   [ configuration B ]-                                                             }                                                                                  location ^~ /images/ {  # 优先匹配并会停止匹配                                                               # matches any query beginning with /images/ and halts searching,                   # so regular expressions will not be checked.                                      [ configuration C ]-                                                             }                                                                                  location ~* \.(gif|jpg|jpeg)$ {   # 不区分大小写匹配                                                     # matches any request ending in gif, jpg, or jpeg. However, all                    # requests to the /images/ directory will be handled by                            # Configuration C.---                                                              [ configuration D ]-                                                             }

热点排行