Skip to content

Commit cdfc275

Browse files
committed
Fix inner link
1 parent a64eb18 commit cdfc275

19 files changed

+389
-355
lines changed

Configuration.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,8 @@ We also added an example(for unit testing) about this, in nginx.conf
580580
}
581581
```
582582

583-
The example java rewrite handler code can be found from https://github.com/nginx-clojure/nginx-clojure/blob/master/test/java/nginx/clojure/java/RewriteHandlerTestSet4NginxJavaRingHandler.java#L35
583+
The example java rewrite handler code can be found from
584+
[RewriteHandlerTestSet4NginxJavaRingHandler.java](https://github.com/nginx-clojure/nginx-clojure/blob/master/test/java/nginx/clojure/java/RewriteHandlerTestSet4NginxJavaRingHandler.java#L35)
584585

585586

586587
2.6 Nginx Access Handler

Configuration.md.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,8 @@ <h3>
493493
<span class="pl-k">rewrite_handler_name</span> <span class="pl-s">'nginx.clojure.java.RewriteHandlerTestSet4NginxJavaRingHandler<span class="pl-smi">$SimpleRewriteByBodyHandler</span>'</span>;
494494
<span class="pl-k">proxy_pass</span> http://<span class="pl-smi">$myup</span>;
495495
}</pre></div>
496-
<p>The example java rewrite handler code can be found from <a href="https://github.com/nginx-clojure/nginx-clojure/blob/master/test/java/nginx/clojure/java/RewriteHandlerTestSet4NginxJavaRingHandler.java#L35">https://github.com/nginx-clojure/nginx-clojure/blob/master/test/java/nginx/clojure/java/RewriteHandlerTestSet4NginxJavaRingHandler.java#L35</a></p>
496+
<p>The example java rewrite handler code can be found from
497+
<a href="https://github.com/nginx-clojure/nginx-clojure/blob/master/test/java/nginx/clojure/java/RewriteHandlerTestSet4NginxJavaRingHandler.java#L35">RewriteHandlerTestSet4NginxJavaRingHandler.java</a></p>
497498
<h2>
498499
<a id="user-content-26-nginx-access-handler" class="anchor" href="#26-nginx-access-handler" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>2.6 Nginx Access Handler</h2>
499500
<p>Although we can do similar things within a rewrite handler but using Nginx Access Handler will further define roles of all kind of handlers.

Directives.md

+76-54
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11

22
# Directives Reference
33

4-
* [jvm_path](#jvm_path)
5-
* [jvm_var](#jvm_var)
6-
* [jvm_classpath](#jvm_classpath)
7-
* [jvm_classpath_check](#jvm_classpath_check)
8-
* [jvm_workers](#jvm_workers)
9-
* [jvm_options](#jvm_options)
10-
* [jvm_handler_type](#jvm_handler_type)
11-
* [jvm_init_handler_name](#jvm_init_handler_name)
12-
* [jvm_init_handler_code](#jvm_init_handler_code)
13-
* [jvm_exit_handler_name](#jvm_exit_handler_name)
14-
* [jvm_exit_handler_code](#jvm_exit_handler_code)
15-
* [handlers_lazy_init](#handlers_lazy_init)
16-
* [auto_upgrade_ws](#auto_upgrade_ws)
17-
* [content_handler_type](#content_handler_type)
18-
* [content_handler_name](#content_handler_name)
19-
* [content_handler_code](#content_handler_code)
20-
* [content_handler_property](#content_handler_property)
21-
* [rewrite_handler_type](#rewrite_handler_type)
22-
* [rewrite_handler_name](#rewrite_handler_name)
23-
* [rewrite_handler_code](#rewrite_handler_code)
24-
* [rewrite_handler_property](#rewrite_handler_property)
25-
* [access_handler_type](#access_handler_type)
26-
* [access_handler_name](#access_handler_name)
27-
* [access_handler_code](#access_handler_code)
28-
* [access_handler_property](#access_handler_property)
29-
* [header_filter_type](#header_filter_type)
30-
* [header_filter_name](#header_filter_name)
31-
* [header_filter_code](#header_filter_code)
32-
* [header_filter_property](#header_filter_property)
33-
* [body_filter_type](#body_filter_type)
34-
* [body_filter_name](#body_filter_name)
35-
* [body_filter_code](#body_filter_code)
36-
* [body_filter_property](#body_filter_property)
37-
* [log_handler_type](#log_handler_type)
38-
* [log_handler_name](#log_handler_name)
39-
* [log_handler_code](#log_handler_code)
40-
* [log_handler_property](#log_handler_property)
41-
* [always_read_body](#always_read_body)
42-
* [shared_map](#shared_map)
43-
* [write_page_size](#write_page_size)
4+
* [jvm_path](#user-content-jvm_path)
5+
* [jvm_var](#user-content-jvm_var)
6+
* [jvm_classpath](#user-content-jvm_classpath)
7+
* [jvm_classpath_check](#user-content-jvm_classpath_check)
8+
* [jvm_workers](#user-content-jvm_workers)
9+
* [jvm_options](#user-content-jvm_options)
10+
* [jvm_handler_type](#user-content-jvm_handler_type)
11+
* [jvm_init_handler_name](#user-content-jvm_init_handler_name)
12+
* [jvm_init_handler_code](#user-content-jvm_init_handler_code)
13+
* [jvm_exit_handler_name](#user-content-jvm_exit_handler_name)
14+
* [jvm_exit_handler_code](#user-content-jvm_exit_handler_code)
15+
* [handlers_lazy_init](#user-content-handlers_lazy_init)
16+
* [auto_upgrade_ws](#user-content-auto_upgrade_ws)
17+
* [content_handler_type](#user-content-content_handler_type)
18+
* [content_handler_name](#user-content-content_handler_name)
19+
* [content_handler_code](#user-content-content_handler_code)
20+
* [content_handler_property](#user-content-content_handler_property)
21+
* [rewrite_handler_type](#user-content-rewrite_handler_type)
22+
* [rewrite_handler_name](#user-content-rewrite_handler_name)
23+
* [rewrite_handler_code](#user-content-rewrite_handler_code)
24+
* [rewrite_handler_property](#user-content-rewrite_handler_property)
25+
* [access_handler_type](#user-content-access_handler_type)
26+
* [access_handler_name](#user-content-access_handler_name)
27+
* [access_handler_code](#user-content-access_handler_code)
28+
* [access_handler_property](#user-content-access_handler_property)
29+
* [header_filter_type](#user-content-header_filter_type)
30+
* [header_filter_name](#user-content-header_filter_name)
31+
* [header_filter_code](#user-content-header_filter_code)
32+
* [header_filter_property](#user-content-header_filter_property)
33+
* [body_filter_type](#user-content-body_filter_type)
34+
* [body_filter_name](#user-content-body_filter_name)
35+
* [body_filter_code](#user-content-body_filter_code)
36+
* [body_filter_property](#user-content-body_filter_property)
37+
* [log_handler_type](#user-content-log_handler_type)
38+
* [log_handler_name](#user-content-log_handler_name)
39+
* [log_handler_code](#user-content-log_handler_code)
40+
* [log_handler_property](#user-content-log_handler_property)
41+
* [always_read_body](#user-content-always_read_body)
42+
* [shared_map](#user-content-shared_map)
43+
* [write_page_size](#user-content-write_page_size)
4444

4545

4646
## jvm_path
@@ -51,11 +51,38 @@
5151
* **Context**: http
5252

5353
Defines jvm shared library path. When `auto` is used it will auto-detect jvm path otherwise it should be a real jvm shared library path. e.g.
54-
* On Windows 32-bit it maybe is `C:/Program Files/Java/jdk1.7.0_25/jre/bin/server/jvm.dll`,
55-
* On MacOSX it maybe is `/Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Libraries/libserver.dylib` or `/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre/lib/server/libjvm.dylib`;
56-
* On Ubuntu, it maybe is `/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server/libjvm.so`;
57-
* On CentOS 64-bit, it maybe is `/usr/java/jdk1.6.0_45/jre/lib/amd64/server/libjvm.so`;
58-
* On CentOS 32-bit, it maybe is `/usr/java/jdk1.7.0_51/jre/lib/i386/server/libjvm.so`;
54+
55+
* On Windows 32-bit it maybe is
56+
57+
```
58+
C:/Program Files/Java/jdk1.7.0_25/jre/bin/server/jvm.dll
59+
```
60+
61+
* On MacOSX it maybe is
62+
63+
```
64+
/Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Libraries/libserver.dylib
65+
or
66+
/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre/lib/server/libjvm.dylib
67+
```
68+
69+
* On Ubuntu, it maybe is
70+
71+
```
72+
/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server/libjvm.so`;
73+
```
74+
75+
* On CentOS 64-bit, it maybe is
76+
77+
```
78+
/usr/java/jdk1.6.0_45/jre/lib/amd64/server/libjvm.so`;
79+
```
80+
81+
* On CentOS 32-bit, it maybe is
82+
83+
```
84+
/usr/java/jdk1.7.0_51/jre/lib/i386/server/libjvm.so`;
85+
```
5986

6087
## jvm_var
6188

@@ -64,7 +91,7 @@ Defines jvm shared library path. When `auto` is used it will auto-detect jvm pat
6491
* **Context**: http
6592
* **repeatable** true
6693

67-
Defines a varaible which can be reused in jvm related directives such as [jvm_var](#jvm_var), [jvm_classpath](#jvm_classpath), [jvm_options](#jvm_options).
94+
Defines a varaible which can be reused in jvm related directives such as [jvm_var](#user-content-jvm_var), [jvm_classpath](#user-content-jvm_classpath), [jvm_options](#user-content-jvm_options).
6895

6996
e.g.
7097

@@ -575,7 +602,7 @@ Here 's an example to implement a simple HTTP Basic Authentication.
575602
* **Default**: —
576603
* **Context**: location
577604

578-
Specifies a access handler by a block of inline code. See [access_handler_name](#access_handler_name).
605+
Specifies a access handler by a block of inline code. See [access_handler_name](#user-content-access_handler_name).
579606

580607
## access_handler_property
581608

@@ -677,7 +704,7 @@ import nginx.clojure.java.Constants;
677704
* **Context**: location
678705

679706

680-
Specifies a header filter by a block of inline code. See [header_filter_name](#header_filter_name).
707+
Specifies a header filter by a block of inline code. See [header_filter_name](#user-content-header_filter_name).
681708

682709
## header_filter_property
683710

@@ -790,7 +817,7 @@ public static class UppercaseBodyFilter extends StringFacedJavaBodyFilter {
790817
* **Context**: location
791818

792819

793-
Specifies a header filter by a block of inline code. See [body_filter_name](#body_filter_name).
820+
Specifies a header filter by a block of inline code. See [body_filter_name](#user-content-body_filter_name).
794821

795822
## body_filter_property
796823

@@ -989,11 +1016,6 @@ generate hash code. The key/value of shared hash map can be `int`,`long`,`String
9891016

9901017
**limitation**
9911018

992-
type | entry structure size(Bytes)| table structure size(Bytes)| space limit |entries limit| key limit| value limit|
993-
------------ | -----------|-----------|-------------|------------|--------------------|---------------------
994-
tiny map |24 |entries x 4| 4G (64-bit) or 2G (32-bit)| 2^31=2.14Billions | 16M | 4G (64-bit) or 2G (32-bit) |
995-
hash map |40(64-bit) or 28(32-bit)|entries x 8(64-bit) or 4 (32-bit) |OS process memory limit| 2^63 (64-bit) or 2^31 (32-bit)| OS process memory limit | OS process memory limit |
996-
9971019
But note that if needed memory size is less than half of OS page size the real allocated size of nginx slab only can be
9981020
2^3 = 8, 2^4 = 16, 2^5 = 32,..., 2^(ngx_pagesize_shift - 1).So on 64-bit OS entry structure size of tiny map really
9991021
uses 32Bytes hash map uses 64Bytes. We'll do some optimize work in the future versions.

0 commit comments

Comments
 (0)