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 {
116116 error_page 404 @trailslashControl;
117117
118118 proxy_pass ${S3_SERVER_PROTO}://storage_urls$s3uri;
119+
120+ include /etc/nginx/conf.d/gateway/s3_location.conf;
119121 }
120122
121123 location @s3Listing {
@@ -164,6 +166,7 @@ server {
164166 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;
165167
166168 proxy_pass ${S3_SERVER_PROTO}://storage_urls$s3Uri;
169+ include /etc/nginx/conf.d/gateway/s3listing_location.conf;
167170 }
168171
169172 location @error404 {
@@ -187,4 +190,6 @@ server {
187190 add_header Allow "GET, HEAD" always;
188191 return 405;
189192 }
193+
194+ include /etc/nginx/conf.d/gateway/s3_server.conf;
190195}
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 22
33## Extending the Gateway
44
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+
531In the [ examples/ directory] ( /examples ) , there are ` Dockerfile ` examples that
632show how to extend the base functionality of the NGINX S3 Gateway by adding
733additional modules.
You can’t perform that action at this time.
0 commit comments