Skip to content

Commit 0e9346b

Browse files
committed
ModuleReference: Add testing module-reference docs
1 parent 18738a5 commit 0e9346b

File tree

102 files changed

+36867
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+36867
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: NGINX Module Reference
3+
description:
4+
---
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: NGINX HTTP Reference
3+
description:
4+
---
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: ngx_http_access_module
3+
description: ngx_http_access_module
4+
toc: true
5+
nd-org-source: http/ngx_http_access_module.xml
6+
nd-plus: false
7+
nd-partial-plus: false
8+
---
9+
10+
11+
<!--
12+
********************************************************************************
13+
🛑 WARNING: AUTOGENERATED FILE - DO NOT EDIT 🛑 This Markdown file was
14+
automatically generated from the source XML documentation. Any manual
15+
changes made directly to this file will be overwritten. To request or
16+
suggest changes, please edit the source XML files instead.
17+
https://github.com/nginx/nginx.org/tree/main/xml/en
18+
********************************************************************************
19+
-->
20+
21+
22+
The `ngx_http_access_module` module allows
23+
limiting access to certain client addresses.
24+
25+
Access can also be limited by
26+
[password](/nginx/module-reference/http/ngx_http_auth_basic_module), by the
27+
[result of subrequest](/nginx/module-reference/http/ngx_http_auth_request_module),
28+
or by [JWT](/nginx/module-reference/http/ngx_http_auth_jwt_module).
29+
Simultaneous limitation of access by address and by password is controlled
30+
by the [satisfy](/nginx/module-reference/http/ngx_http_core_module#satisfy) directive.
31+
## Example Configuration
32+
33+
34+
```nginx
35+
location / {
36+
deny 192.168.1.1;
37+
allow 192.168.1.0/24;
38+
allow 10.1.1.0/16;
39+
allow 2001:0db8::/32;
40+
deny all;
41+
}
42+
43+
```
44+
45+
46+
The rules are checked in sequence until the first match is found.
47+
In this example, access is allowed only for IPv4 networks
48+
`10.1.1.0/16` and `192.168.1.0/24`
49+
excluding the address `192.168.1.1`,
50+
and for IPv6 network `2001:0db8::/32`.
51+
In case of a lot of rules, the use of the
52+
[ngx_http_geo_module](/nginx/module-reference/http/ngx_http_geo_module)
53+
module variables is preferable.
54+
## Directives
55+
56+
### allow
57+
58+
{{< call-out >}}
59+
60+
**Syntax:** allow `address` | `CIDR` | `unix:` | `all`
61+
62+
**Default:** -
63+
64+
**Context:** http, server, location, limit_except
65+
66+
67+
{{</call-out>}}
68+
69+
70+
Allows access for the specified network or address.
71+
If the special value `unix:` is specified (1.5.1),
72+
allows access for all UNIX-domain sockets.
73+
### deny
74+
75+
{{< call-out >}}
76+
77+
**Syntax:** deny `address` | `CIDR` | `unix:` | `all`
78+
79+
**Default:** -
80+
81+
**Context:** http, server, location, limit_except
82+
83+
84+
{{</call-out>}}
85+
86+
87+
Denies access for the specified network or address.
88+
If the special value `unix:` is specified (1.5.1),
89+
denies access for all UNIX-domain sockets.
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: ngx_http_addition_module
3+
description: ngx_http_addition_module
4+
toc: true
5+
nd-org-source: http/ngx_http_addition_module.xml
6+
nd-plus: false
7+
nd-partial-plus: false
8+
---
9+
10+
11+
<!--
12+
********************************************************************************
13+
🛑 WARNING: AUTOGENERATED FILE - DO NOT EDIT 🛑 This Markdown file was
14+
automatically generated from the source XML documentation. Any manual
15+
changes made directly to this file will be overwritten. To request or
16+
suggest changes, please edit the source XML files instead.
17+
https://github.com/nginx/nginx.org/tree/main/xml/en
18+
********************************************************************************
19+
-->
20+
21+
22+
The `ngx_http_addition_module` module is a filter
23+
that adds text before and after a response.
24+
This module is not built by default, it should be enabled with the
25+
`--with-http_addition_module`
26+
configuration parameter.
27+
## Example Configuration
28+
29+
30+
```nginx
31+
location / {
32+
add_before_body /before_action;
33+
add_after_body /after_action;
34+
}
35+
36+
```
37+
38+
## Directives
39+
40+
### add_before_body
41+
42+
{{< call-out >}}
43+
44+
**Syntax:** add_before_body `uri`
45+
46+
**Default:** -
47+
48+
**Context:** http, server, location
49+
50+
51+
{{</call-out>}}
52+
53+
54+
Adds the text returned as a result of processing a given subrequest
55+
before the response body.
56+
An empty string (`""`) as a parameter cancels addition
57+
inherited from the previous configuration level.
58+
### add_after_body
59+
60+
{{< call-out >}}
61+
62+
**Syntax:** add_after_body `uri`
63+
64+
**Default:** -
65+
66+
**Context:** http, server, location
67+
68+
69+
{{</call-out>}}
70+
71+
72+
Adds the text returned as a result of processing a given subrequest
73+
after the response body.
74+
An empty string (`""`) as a parameter cancels addition
75+
inherited from the previous configuration level.
76+
### addition_types
77+
78+
{{< call-out >}}
79+
80+
**Syntax:** addition_types `mime-type` ...
81+
82+
**Default:** text/html
83+
84+
**Context:** http, server, location
85+
86+
_This directive appeared in version 0.7.9._
87+
88+
89+
{{</call-out>}}
90+
91+
92+
Allows adding text in responses with the specified MIME types,
93+
in addition to “`text/html`”.
94+
The special value “`*`” matches any MIME type (0.8.29).

0 commit comments

Comments
 (0)