WIP Deploy substr

This commit is contained in:
2024-10-23 15:53:07 +02:00
parent c8160e38c8
commit c878ed1a1e
6 changed files with 131 additions and 1 deletions

View File

@@ -4,6 +4,12 @@ upstream _strfry {
<% end %>
}
upstream _substr {
<% @upstream_hosts.each do |host| %>
server <%= host %>:30023;
<% end %>
}
server {
server_name <%= @domain %>;
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
@@ -15,6 +21,16 @@ server {
ssl_certificate <%= @ssl_cert %>;
ssl_certificate_key <%= @ssl_key %>;
location = /favicon.ico {
alias /var/www/assets.kosmos.org/site/img/favicon.ico;
}
location ~* ^/[@~n]|^/assets {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://_substr;
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;