In addition to installing and configuring the new module, this also enables public access to the S3 API via `bucket-name.s3.kosmos.org` as well as Web access on `bucket-name.web.s3.kosmos.org` (when enabled). Also includes some drive-by improvements to Chef attribute naming and usage. Co-authored-by: Greg Karékinian <greg@karekinian.com>
28 lines
755 B
Plaintext
28 lines
755 B
Plaintext
server {
|
|
listen <%= "#{node[:openresty][:listen_ip]}:" if node[:openresty][:listen_ip] %>443 ssl http2;
|
|
listen [::]:443 http2 ssl;
|
|
|
|
server_name <%= @server_name %>;
|
|
|
|
ssl_certificate <%= @ssl_cert %>;
|
|
ssl_certificate_key <%= @ssl_key %>;
|
|
|
|
access_log <%= node[:openresty][:log_dir] %>/<%= @domain_name %>.access.log json;
|
|
error_log <%= node[:openresty][:log_dir] %>/<%= @domain_name %>.error.log warn;
|
|
|
|
error_page 401 403 404 500 /__empty-page.html;
|
|
|
|
location = /__empty-page.html {
|
|
internal;
|
|
return 200 "";
|
|
}
|
|
|
|
location / {
|
|
proxy_intercept_errors on;
|
|
proxy_cache garage_cache;
|
|
proxy_pass http://garage_web;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $host;
|
|
}
|
|
}
|