2024-01-31 21:06:19 +00:00
|
|
|
log_format gateway '$remote_addr [$time_local] '
|
2023-12-16 17:47:04 +00:00
|
|
|
'$protocol $status $bytes_sent $bytes_received '
|
|
|
|
'$session_time "$ssl_preread_server_name" '
|
|
|
|
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
|
2021-08-22 22:34:27 +01:00
|
|
|
|
2023-12-16 17:47:04 +00:00
|
|
|
log_format ips '$remote_addr [$time_local] $ssl_preread_server_name';
|
2021-08-22 22:34:27 +01:00
|
|
|
|
2024-01-31 21:06:19 +00:00
|
|
|
access_log /var/log/nginx/gateway.log gateway;
|
2023-12-16 17:47:04 +00:00
|
|
|
access_log /var/log/nginx/ips.log ips;
|
2022-01-19 09:00:20 +00:00
|
|
|
|
2024-01-27 14:18:37 +00:00
|
|
|
map $ssl_preread_server_name $gateway_destination {
|
2024-02-21 21:42:16 +00:00
|
|
|
default {{ wireguard.clients.ingress.ip }}:8443;
|
|
|
|
|
|
|
|
headscale.jakehoward.tech 127.0.0.1:8888;
|
|
|
|
|
|
|
|
{% for domain in cdn_domains %}
|
|
|
|
{{ domain }} 127.0.0.1:8800;
|
|
|
|
{% endfor %}
|
2024-01-27 14:18:37 +00:00
|
|
|
}
|
|
|
|
|
2023-12-16 17:47:04 +00:00
|
|
|
server {
|
|
|
|
listen 443;
|
|
|
|
listen 8448;
|
2024-01-27 14:18:37 +00:00
|
|
|
proxy_pass $gateway_destination;
|
2023-12-16 17:47:04 +00:00
|
|
|
proxy_protocol on;
|
2021-08-22 22:34:27 +01:00
|
|
|
}
|