The respective bucket needs to be configured with a domain alias. When a new alias is added to the `s3_web_domains` config, a new nginx site can then be deployed to the `nginx_proxy` hosts.
34 lines
725 B
Plaintext
34 lines
725 B
Plaintext
upstream garage_web {
|
|
server localhost:3902;
|
|
}
|
|
|
|
proxy_cache_path /var/cache/nginx/garage levels=1:2 keys_zone=garage_cache:10m
|
|
max_size=1g inactive=60m use_temp_path=off;
|
|
|
|
server {
|
|
listen 443 http2 ssl;
|
|
listen [::]:443 http2 ssl;
|
|
|
|
server_name <%= @server_name %>;
|
|
|
|
access_log off;
|
|
|
|
ssl_certificate <%= @ssl_cert %>;
|
|
ssl_certificate_key <%= @ssl_key %>;
|
|
|
|
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;
|
|
}
|
|
}
|