1
- # Nginx Module
1
+ # About
2
2
3
- #### Installation
3
+ Nginx HTTP module to do redirections on data coming from https://redirection.io/
4
4
5
- ```
6
- fab local.infastructure.build
7
- ```
5
+ ## Installation
8
6
9
- #### Compile nginx + module and execute nginx with it
7
+ When using the default nginx version of your distribution use this documentation to install the module
8
+ https://redirection.io/documentation/developer-documentation/nginx-module
10
9
11
- ```
12
- fab local.nginx.compile_and_test
13
- ```
10
+ ### Manual
14
11
15
- #### Compile nginx + module and execute nginx with it and will output memory error into memory.log file
12
+ If your nginx version is different from the default distribution or your distribution is not supported
13
+ you have to compile this module yourself.
16
14
17
- ```
18
- fab local.nginx.compile_and_test_memory_leaks
19
- ```
15
+ When compiling this module you need to use the ** same exact source** and the ** same exact compilation flags**
16
+ which were used to compile the nginx binary (some patches may be added compared to the official source).
20
17
21
- #### Rebuild from scratch (clean + build)
18
+ You have to add the following directive on the ` ./configure ` script:
22
19
23
- ```
24
- touch clients/nginx-redirectionio-module/config
25
- fab local.nginx.compile_and_test[_memory_leaks]
26
- ```
20
+ ` --add-dynamic-module=/path/to/nginx-redirectionio-module-source ` for a dynamic module (loaded with a config directive)
27
21
28
- #### Building modules for distribs
22
+ or
29
23
30
- ````
31
- docker build -f clients/nginx-redirectionio-module/Dockerfile[distrib] -t modulecompile clients/nginx-redirectionio-module
32
- docker run -ti -v `pwd`/clients:/root/clients modulecompile
33
- ````
24
+ ` --add-module=/path/to/nginx-redirectionio-module-source ` for a static module (present in the binary)
34
25
35
- ### Proxy Directives
26
+ ## Directives
36
27
37
- #### redirectionio
28
+ ### redirectionio
38
29
39
30
** syntax:** * redirectionio on|off*
40
31
@@ -44,27 +35,7 @@ docker run -ti -v `pwd`/clients:/root/clients modulecompile
44
35
45
36
Enable or disable redirectionio matching process for request matching the current context.
46
37
47
- #### redirectionio_project_key
48
-
49
- ** syntax:** * redirectionio_project_key key*
50
-
51
- ** default:** * none*
52
-
53
- ** context:** * http, server, server if, location, location if*
54
-
55
- Set the project key to use for request matching the current context.
56
-
57
- #### redirectionio_no_logs
58
-
59
- ** syntax:** * redirectionio_no_logs on|off*
60
-
61
- ** default:** * off*
62
-
63
- ** context:** * http, server, server if, location, location if*
64
-
65
- Disable or reenable logs for the current matching context
66
-
67
- #### redirectionio_pass
38
+ ### redirectionio_pass
68
39
69
40
** syntax:** * redirectionio_pass ip: port |unix:///path*
70
41
@@ -74,85 +45,22 @@ Disable or reenable logs for the current matching context
74
45
75
46
Specify the Agent backend for matching requests
76
47
77
- ### Agent Directives
78
-
79
- #### redirectionio_agent_enable
80
-
81
- ** syntax:** * redirectionio_agent_enable on|off*
82
-
83
- ** default:** * on*
84
-
85
- ** context:** * http*
86
-
87
- Enable or disable launching a redirectionio agent from nginx
88
-
89
- #### redirectionio_listen
90
-
91
- ** syntax:** * redirectionio_listen ip: port |unix:///path*
92
-
93
- ** default:** * 127.0.0.1:10301*
94
-
95
- ** context:** * http*
96
-
97
- Specify the backend network where the agent should listen to
48
+ ### redirectionio_project_key
98
49
99
- #### redirectionio_host
100
-
101
- ** syntax:** * redirectionio_host ip: port |unix:///path*
102
-
103
- ** default:** * https://api.redirection.io *
104
-
105
- ** context:** * http*
106
-
107
- On which host the agent should make api calls
108
-
109
- #### redirectionio_instance_name
110
-
111
- ** syntax:** * redirectionio_instance_name ip: port |unix:///path*
112
-
113
- ** default:** * machine hostname*
114
-
115
- ** context:** * http*
116
-
117
- Identifier for the agent that allows to trace logs and update from the manager
118
-
119
- #### redirectionio_persist
120
-
121
- ** syntax:** * redirectionio_persist on|off*
122
-
123
- ** default:** * on*
124
-
125
- ** context:** * http*
126
-
127
- Whether or not rules should be persisted on disk
128
-
129
- #### redirectionio_datadir
130
-
131
- ** syntax:** * redirectionio_datadir ip: port |unix:///path*
132
-
133
- ** default:** * /var/lib/redirectionio*
134
-
135
- ** context:** * http*
136
-
137
- On which directory rules should be stored
138
-
139
- #### redirectionio_cache
140
-
141
- ** syntax:** * redirectionio_cache on|off*
50
+ ** syntax:** * redirectionio_project_key key*
142
51
143
- ** default:** * on *
52
+ ** default:** * none *
144
53
145
- ** context:** * http*
54
+ ** context:** * http, server, server if, location, location if *
146
55
147
- Whether or not rules should be cached, when enabled it will consume more memory but will respond faster, when disabled
148
- consumes less memory but slower.
56
+ Set the project key to use for request matching the current context.
149
57
150
- #### redirectionio_debug
58
+ ### redirectionio_no_logs
151
59
152
- ** syntax:** * redirectionio_debug on|off*
60
+ ** syntax:** * redirectionio_no_logs on|off*
153
61
154
- ** default:** * off *
62
+ ** default:** * [ value of redirectionio directive ] *
155
63
156
- ** context:** * http*
64
+ ** context:** * http, server, server if, location, location if *
157
65
158
- Enable or disable debug log for the agent (if enable error_log of nginx should be set to debug too)
66
+ Disable or reenable logs for the current matching context
0 commit comments