infrastructure/ansible/roles/gateway/files/nginx.conf
Jake Howard 2ceeaf091d
Some checks failed
/ terraform (push) Failing after 11m20s
/ ansible (push) Failing after 11m6s
Deploy headscale
2024-01-27 14:18:37 +00:00

21 lines
700 B
Nginx Configuration File

log_format access '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time "$ssl_preread_server_name" '
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
log_format ips '$remote_addr [$time_local] $ssl_preread_server_name';
access_log /var/log/nginx/access.log access;
access_log /var/log/nginx/ips.log ips;
map $ssl_preread_server_name $gateway_destination {
headscale.jakehoward.tech 127.0.0.1:8888;
default {{ wireguard.clients.ingress.ip }}:8443;
}
server {
listen 443;
listen 8448;
proxy_pass $gateway_destination;
proxy_protocol on;
}