注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Perfect-World

以無法為有法,以無限為有限!

 
 
 

日志

 
 

Nginx其他模块—Addition模块  

2015-08-14 17:56:17|  分类: Web Server |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Addition模块

This module adds responses of other locations before and after the current location's response.

It is implemented as an output filter, the contents of the main request and subrequests to other locations are not buffered completely and are still sent to the client in a streaming fashion. Because the length of the final response body is unkown while sending the HTTP headers, the HTTP chunked encoding is always used here.

Installation

By default the module is not built, it is necessary to enable its build with

./configure --with-http_addition_module

at compilation time.

Example:

location / {
							

  add_before_body   /before_action;

  add_after_body    /after_action;

 

}
					

Limitations

Note that as of 0.8.17 no contents will be added if the current location is served as a subrequest itself. Consider the following example:

location /foo {
							

  add_before_body /bar;

}
					

   

 

location /bar {
							

 add_before_body  /baz;

}
					

Then accessing /foo won't get /baz inserted before the contents of the subrequest /bar.

Also note that at this time, only strings can be used in before/after body locations, not variables. So

location / {
							

  set $before_action /before_action;

  add_before_body $before_action;

}
					

will not work as expected (although the configuration file will still load properly).

Directives

add_before_body

syntax: add_before_body uri

default: no

context: http, server, location

Directive adds content of uri before the response body, issued as a result of the work of the assigned subrequest.

add_after_body

syntax: add_after_body uri

default: no

context: http, server, location

Directive adds content of uri after the response body, issued as a result of the work of the assigned subrequest.

addition_types

syntax: addition_types mime-type [mime-type ...]

default: text/html

context: http, server, location

Directive (since 0.7.9) allows you to add text only to locations of the specified MIME-types (defaults to "text/html").

(Before 0.8.17, this directive was mispelled as "addtion_types" in the source. This bug has been fixed in 0.8.17.)

References

Original Documentation

 

可能您还对以下事情兴趣: 

Nginx在Windows和Linux环境下安装 

Nginx配置文件详细说明 

Linux下Weblogic 11g R1安装和配置 

Weblogic 10.1配置JNDI数据源 

调优 WebSphere Application Server V7 性能 

websphere7.0中配置oracle数据源及部署 

WebLogic、WebSphere、JBOSS、Tomcat之间的区别 

Tomcat下使用war包发布项目 

配置WebLogic Server 11g 集群、Session复制(Windows) 

Weblogic12 集群配置 

WebLogic Server 11g (10.3.6) 和12c (12.1.1)安装步骤 

linux(fedora、redhat)下配置web+ftp服务器全教程 

J2SDK1.4.2下载安装及使用教程 

解决启动WebLogic输入用户名密码问题 & 密码重置

绿色版TOMCAT 7.0安装配置手册

Tomcat7.0 内存配置

weblogic配置JDBC数据源详解

Weblogic内存分配

nginx做weblogic的前端负载均衡器

图文解说:Nginx+tomcat配置集群负载均衡

Websphere如何用80端口来访问9080应用程序

LINUX FTP安装与配置

Linux下安装Nginx详细图解教程

Ubuntu/Debian上安装Nginx+php环境 

使用XAMPP搭建本地JSP+PHP环境 

基于nginx的linux web服务器配置 

手机二维码访问: 

 

  评论这张
 
阅读(107)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016