Files
chef/site-cookbooks/kosmos_garage/templates/nginx_conf_web.erb
2026-02-12 17:05:14 +04:00

28 lines
797 B
Plaintext

server {
listen <%= "#{node[:openresty][:listen_ip]}:" if node[:openresty][:listen_ip] %>443 ssl http2;
listen <%= "[#{node['openresty']['listen_ipv6']}]" %>:443 ssl http2;
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;
}
}