File tree Expand file tree Collapse file tree 5 files changed +40
-0
lines changed
common/etc/nginx/templates Expand file tree Collapse file tree 5 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,8 @@ server {
116
116
error_page 404 @trailslashControl;
117
117
118
118
proxy_pass ${S3_SERVER_PROTO}://storage_urls$s3uri;
119
+
120
+ include /etc/nginx/conf.d/gateway/s3_location.conf;
119
121
}
120
122
121
123
location @s3Listing {
@@ -164,6 +166,7 @@ server {
164
166
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 500 501 502 503 504 505 506 507 508 509 510 511 =404 @error404;
165
167
166
168
proxy_pass ${S3_SERVER_PROTO}://storage_urls$s3Uri;
169
+ include /etc/nginx/conf.d/gateway/s3listing_location.conf;
167
170
}
168
171
169
172
location @error404 {
@@ -187,4 +190,6 @@ server {
187
190
add_header Allow "GET, HEAD" always;
188
191
return 405;
189
192
}
193
+
194
+ include /etc/nginx/conf.d/gateway/s3_server.conf;
190
195
}
Original file line number Diff line number Diff line change
1
+ # This file is intentional left as blank.
2
+ # Use this file to add additional configuration to the "location @s3"
3
+ # block with default.conf.template
Original file line number Diff line number Diff line change
1
+ # This file is intentional left as blank.
2
+ # Use this file to add additional configuration to the "server"
3
+ # block with default.conf.template
Original file line number Diff line number Diff line change
1
+ # This file is intentional left as blank.
2
+ # Use this file to add additional configuration to the "location @s3Listing"
3
+ # block with default.conf.template
Original file line number Diff line number Diff line change 2
2
3
3
## Extending the Gateway
4
4
5
+ ### Extending gateway configuration via container images
6
+
7
+ #### ` conf.d ` Directory
8
+
9
+ On the container image, all files with the extension ` .conf ` in the
10
+ directory ` /etc/nginx/conf.d ` will be loaded into the configuration
11
+ of the base ` http ` block within the main NGINX configuration.
12
+
13
+ This allows for extension of the configuration by adding additional
14
+ configuration files into the container image extending the base
15
+ gateway image.
16
+
17
+ #### Stub Files
18
+
19
+ On the container image there are three NGINX configuration stub files:
20
+
21
+ * [ ` /etc/nginx/conf.d/s3_server.conf ` ] ( /common/etc/nginx/templates/gateway/s3_location.conf.template )
22
+ * [ ` /etc/nginx/conf.d/s3_location.conf ` ] ( /common/etc/nginx/templates/gateway/s3_server.conf.template )
23
+ * [ ` /etc/nginx/conf.d/s3listing_location.conf ` ] ( /common/etc/nginx/templates/gateway/s3listing_location.conf.template )
24
+
25
+ Each of these files can be overwritten in a container image that inherits
26
+ from the S3 Gateway container image, so that additional NGINX configuration
27
+ directives can be inserted into the gateway configuration.
28
+
29
+ ### Examples
30
+
5
31
In the [ examples/ directory] ( /examples ) , there are ` Dockerfile ` examples that
6
32
show how to extend the base functionality of the NGINX S3 Gateway by adding
7
33
additional modules.
You can’t perform that action at this time.
0 commit comments