Skip to content

Commit 5920a57

Browse files
committed
Add gitignore to module directory and better readme
1 parent 0938d15 commit 5920a57

File tree

2 files changed

+30
-119
lines changed

2 files changed

+30
-119
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
buildroot/
2+
work/
3+
dev-build.sh

README.md

Lines changed: 27 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,31 @@
1-
# Nginx Module
1+
# About
22

3-
#### Installation
3+
Nginx HTTP module to do redirections on data coming from https://redirection.io/
44

5-
```
6-
fab local.infastructure.build
7-
```
5+
## Installation
86

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
109

11-
```
12-
fab local.nginx.compile_and_test
13-
```
10+
### Manual
1411

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.
1614

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).
2017

21-
#### Rebuild from scratch (clean + build)
18+
You have to add the following directive on the `./configure` script:
2219

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)
2721

28-
#### Building modules for distribs
22+
or
2923

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)
3425

35-
### Proxy Directives
26+
## Directives
3627

37-
#### redirectionio
28+
### redirectionio
3829

3930
**syntax:** *redirectionio on|off*
4031

@@ -44,27 +35,7 @@ docker run -ti -v `pwd`/clients:/root/clients modulecompile
4435

4536
Enable or disable redirectionio matching process for request matching the current context.
4637

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
6839

6940
**syntax:** *redirectionio_pass ip:port|unix:///path*
7041

@@ -74,85 +45,22 @@ Disable or reenable logs for the current matching context
7445

7546
Specify the Agent backend for matching requests
7647

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
9849

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*
14251

143-
**default:** *on*
52+
**default:** *none*
14453

145-
**context:** *http*
54+
**context:** *http, server, server if, location, location if*
14655

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.
14957

150-
#### redirectionio_debug
58+
### redirectionio_no_logs
15159

152-
**syntax:** *redirectionio_debug on|off*
60+
**syntax:** *redirectionio_no_logs on|off*
15361

154-
**default:** *off*
62+
**default:** *[value of redirectionio directive]*
15563

156-
**context:** *http*
64+
**context:** *http, server, server if, location, location if*
15765

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

Comments
 (0)