Skip to content

Commit 8feb04a

Browse files
committed
add directives reference
1 parent 2f9572e commit 8feb04a

14 files changed

+876
-108
lines changed

Configuration.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ Setting JVM path and class path within `http {` block in nginx.conf
1717
1818
jvm_path auto;
1919
20-
###jvm_options can be repeated once per option.
21-
2220
###define class paths
2321
###for clojure, you should append clojure core jar
2422
###for groovy, you should append groovy runtime jar
25-
jvm_options "-Djava.class.path=#{my_jar_root}/nginx-clojure-0.2.7.jar";
23+
### when wildchar * is used after a path, all jars and sub-directories will appended to
24+
### the jvm classpath. Note that on windows use `;` as separator instead of `:`
25+
jvm_classpath "mylibs1/*:mylibs2/*:/myclasses";
2626
27-
###or we can put jars in some directories, e.g. jars-dir1, jars-dir2
28-
###so that all jars/sub directories from these directories will be appended the jvm classpath
29-
jvm_options "-Djava.ext.dirs=jars-dir1:jars-dir2"
27+
28+
###define jvm options
29+
###jvm_options can be repeated once per option.
3030
3131
###uncomment next two line to define jvm heap memory
3232
#jvm_options "-Xms1024m";
@@ -150,7 +150,7 @@ Please Keep these in your mind:
150150

151151
* By default if the initialization failed the nginx won't start successfully and the worker will exit after reporting an error message in error log file but the master keep running and take the port.
152152
* Because the maybe more than one nginx worker processes, so this code will run everytime per worker starting.
153-
* If you use [SharedHashMap/Chronicle-Map][] to share data
153+
* If you use [Shared Map][], [Chronicle-Map][] to share data
154154
among nginx worker processes, Java file lock can be used to let only one nginx worker process do the initialization.
155155
* If you [enabled coroutine support][], nginx maybe will start successfully even if your initialization failed after some socket operations. If you case it, you can
156156
use `nginx.clojure.core/without-coroutine` to wrap your handler, e.g.
@@ -454,7 +454,7 @@ which explains perfectly the variable scope.
454454
rewrite_handler_type 'clojure';
455455
rewrite_handler_code ' ....
456456
';
457-
proxy_pass $myhost
457+
proxy_pass $myhost;
458458
}
459459
460460
```
@@ -467,7 +467,7 @@ This example is right and there we declare variable $myhost at the outside of `l
467467
rewrite_handler_type 'clojure';
468468
rewrite_handler_code ' ....
469469
';
470-
proxy_pass $myhost
470+
proxy_pass $myhost;
471471
}
472472
473473
```
@@ -521,7 +521,7 @@ We can also use this feature to complete a simple dynamic balancer , e.g.
521521
(set-ngx-var! req "myhost" myhost)
522522
phase-done))
523523
';
524-
proxy_pass $myhost
524+
proxy_pass $myhost;
525525
}
526526
527527
```
@@ -557,7 +557,7 @@ Then we set the java rewrtite handler in nginx.conf
557557
location /myproxy {
558558
rewrite_handler_type 'java';
559559
rewrite_handler_name 'my.test.MyRewriteProxyPassHandler';
560-
proxy_pass $myhost
560+
proxy_pass $myhost;
561561
}
562562
563563
```
@@ -638,7 +638,7 @@ We can use Nginx Header Filter written by Java/Clojure/Groovy to do some useful
638638

639639
Header Filter Access Handler has the same return form with Rewrite Handler/ Access Handler.
640640
When it returns `PHASE_DONE`, nginx will continue the next phase otherwise nginx will response
641-
directly typically with some error information a.
641+
directly typically with some error information.
642642

643643
For Java/Groovy
644644

Configuration.md.html

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)