#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <ngx_http_ajp.h>
#include <ngx_http_ajp_module.h>
#include <ngx_http_ajp_handler.h>
static char *ngx_http_ajp_pass(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
static char *ngx_http_ajp_store(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
#if (NGX_HTTP_CACHE)
static char *ngx_http_ajp_cache(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
static char *ngx_http_ajp_cache_key(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf);
#endif
static char *ngx_http_ajp_lowat_check(ngx_conf_t *cf, void *post,
void *data);
static char *ngx_http_ajp_upstream_max_fails_unsupported(ngx_conf_t *cf,
ngx_command_t *cmd, void *conf);
static char *ngx_http_ajp_upstream_fail_timeout_unsupported(ngx_conf_t *cf,
ngx_command_t *cmd, void *conf);
static void *ngx_http_ajp_create_loc_conf(ngx_conf_t *cf);
static char *ngx_http_ajp_merge_loc_conf(ngx_conf_t *cf,
void *parent, void *child);
static ngx_int_t ngx_http_ajp_module_init_process(ngx_cycle_t *cycle);
static ngx_conf_post_t ngx_http_ajp_lowat_post = { ngx_http_ajp_lowat_check };
static ngx_conf_bitmask_t ngx_http_ajp_next_upstream_masks[] = {
{ ngx_string("error"), NGX_HTTP_UPSTREAM_FT_ERROR },
{ ngx_string("timeout"), NGX_HTTP_UPSTREAM_FT_TIMEOUT },
{ ngx_string("invalid_header"), NGX_HTTP_UPSTREAM_FT_INVALID_HEADER },
{ ngx_string("http_500"), NGX_HTTP_UPSTREAM_FT_HTTP_500 },
{ ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 },
{ ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 },
{ ngx_string("updating"), NGX_HTTP_UPSTREAM_FT_UPDATING },
{ ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF },
{ ngx_null_string, 0 }
};
static ngx_path_init_t ngx_http_ajp_temp_path = {
ngx_string(NGX_HTTP_AJP_TEMP_PATH), { 1, 2, 0 }
};
static ngx_str_t ngx_http_ajp_hide_headers[] = {
ngx_string("Status"),
ngx_string("X-Accel-Expires"),
ngx_string("X-Accel-Redirect"),
ngx_string("X-Accel-Limit-Rate"),
ngx_string("X-Accel-Buffering"),
ngx_string("X-Accel-Charset"),
ngx_null_string
};
#if (NGX_HTTP_CACHE)
static ngx_str_t ngx_http_ajp_hide_cache_headers[] = {
ngx_string("Status"),
ngx_string("X-Accel-Expires"),
ngx_string("X-Accel-Redirect"),
ngx_string("X-Accel-Limit-Rate"),
ngx_string("X-Accel-Buffering"),
ngx_string("X-Accel-Charset"),
ngx_string("Set-Cookie"),
ngx_string("P3P"),
ngx_null_string
};
#endif
static ngx_command_t ngx_http_ajp_commands[] = {
{ ngx_string("ajp_pass"),
NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1,
ngx_http_ajp_pass,
NGX_HTTP_LOC_CONF_OFFSET,
0,
NULL },
{ ngx_string("ajp_header_packet_buffer_size"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_size_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, ajp_header_packet_buffer_size_conf),
NULL },
{ ngx_string("ajp_max_data_packet_size"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_str_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, max_ajp_data_packet_size_conf),
NULL },
{ ngx_string("ajp_store"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_http_ajp_store,
NGX_HTTP_LOC_CONF_OFFSET,
0,
NULL },
{ ngx_string("ajp_store_access"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE123,
ngx_conf_set_access_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.store_access),
NULL },
{ ngx_string("ajp_ignore_client_abort"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.ignore_client_abort),
NULL },
{ ngx_string("ajp_connect_timeout"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_msec_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.connect_timeout),
NULL },
{ ngx_string("ajp_send_timeout"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_msec_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.send_timeout),
NULL },
{ ngx_string("ajp_send_lowat"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_size_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.send_lowat),
&ngx_http_ajp_lowat_post },
{ ngx_string("ajp_buffer_size"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_size_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.buffer_size),
NULL },
{ ngx_string("ajp_pass_request_headers"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.pass_request_headers),
NULL },
{ ngx_string("ajp_pass_request_body"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.pass_request_body),
NULL },
{ ngx_string("ajp_intercept_errors"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.intercept_errors),
NULL },
{ ngx_string("ajp_read_timeout"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_msec_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.read_timeout),
NULL },
{ ngx_string("ajp_buffers"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE2,
ngx_conf_set_bufs_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.bufs),
NULL },
{ ngx_string("ajp_busy_buffers_size"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_size_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.busy_buffers_size_conf),
NULL },
#if (NGX_HTTP_CACHE)
{ ngx_string("ajp_cache"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_http_ajp_cache,
NGX_HTTP_LOC_CONF_OFFSET,
0,
NULL },
{ ngx_string("ajp_cache_key"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_http_ajp_cache_key,
NGX_HTTP_LOC_CONF_OFFSET,
0,
NULL },
{ ngx_string("ajp_cache_path"),
NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
ngx_http_file_cache_set_slot,
0,
0,
&ngx_http_ajp_module },
{ ngx_string("ajp_cache_valid"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
ngx_http_file_cache_valid_set_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.cache_valid),
NULL },
{ ngx_string("ajp_cache_min_uses"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_num_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.cache_min_uses),
NULL },
{ ngx_string("ajp_cache_use_stale"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
ngx_conf_set_bitmask_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ajp_loc_conf_t, upstream.cache_use_st
没有合适的资源?快使用搜索试试~ 我知道了~
nginx-ajp-module-0.3.0.zip
共48个文件
pm:22个
t:7个
c:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 122 浏览量
2023-09-20
19:57:36
上传
评论
收藏 136KB ZIP 举报
温馨提示
nginx_ajp_module-0.3.0.zip 通过这个模块,Nginx可以直接连接AJP端口。 安装示例: $ wget 'http://nginx.org/download/nginx-1.4.4.tar.gz' $ tar -xzvf nginx-1.4.4.tar.gz $ cd nginx-1.4.4/ $ ./configure --add-module=/path/to/nginx_ajp_module $ make $ make install
资源推荐
资源详情
资源评论
收起资源包目录
nginx_ajp_module-0.3.0.zip (48个子文件)
nginx_ajp_module-0.3.0
README.markdown 18KB
README 18KB
ngx_http_ajp.h 14KB
ngx_http_ajp.c 21KB
ngx_http_ajp_handler.c 27KB
ngx_http_ajp_module.c 30KB
ngx_http_ajp_module.h 650B
test
inc
Spiffy.pm 15KB
Module
Install.pm 12KB
AutoInstall.pm 22KB
Install
Base.pm 1KB
Win32.pm 2KB
AutoInstall.pm 2KB
Can.pm 2KB
Include.pm 525B
WriteAll.pm 1KB
TestBase.pm 539B
Fetch.pm 2KB
Metadata.pm 18KB
Makefile.pm 12KB
Test
Base.pm 18KB
More.pm 16KB
Base
Filter.pm 7KB
Builder
Module.pm 1KB
Builder.pm 30KB
t
ajp_post.t 16KB
ajp_get.t 471B
ajp_head.t 462B
ajp_keepalive.t 1KB
ajp_store.t 858B
ajp_cache.t 1KB
ajp_put.t 565B
lib
Test
Nginx.pm 9KB
Nginx
Socket.pm 53KB
LWP.pm 13KB
Util.pm 23KB
README 10KB
webapps
index.html 153B
upload.jsp 453B
single_upload_page.jsp 435B
test.sh 204B
README.wiki 18KB
ngx_http_ajp_msg.c 9KB
ngx_http_ajp_handler.h 2KB
util
update-readme.sh 148B
pod2markdown.pl 673B
wiki2pod.pl 3KB
config 964B
共 48 条
- 1
资源评论
YunFeiDong
- 粉丝: 171
- 资源: 4034
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功