Skip to content

Commit e5e0587

Browse files
committed
nginx
1 parent 398bc87 commit e5e0587

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

debian/postinst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ fi
2727
# Remove the influxdb2 package default config — we use influxdb.toml exclusively.
2828
rm -f /etc/influxdb/config.toml
2929

30+
# Reload nginx to pick up the InfluxDB proxy location block.
31+
if nginx -t -c /etc/nginx/nginx.conf &>/dev/null && systemctl is-active --quiet nginx; then
32+
nginx -s reload
33+
fi
34+
3035
#DEBHELPER#
3136

3237
exit 0

debian/rules

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
# need to rename a couple files, so do that here.
1414
#
1515
override_dh_auto_build:
16-
mkdir -p build/cmd/
16+
mkdir -p build/cmd/ build/influxdb/
1717
cp cmd/estat.py build/cmd/estat
1818
cp cmd/stbtrace.py build/cmd/stbtrace
1919
cp cmd/nfs_threads.py build/cmd/nfs_threads
2020
cp cmd/dsp.py build/cmd/dsp
21+
cp influxdb/influxdb-nginx.conf build/influxdb/influxdb.conf
2122

2223
override_dh_auto_install:
2324
dh_install build/cmd/* /usr/bin
@@ -29,3 +30,4 @@ override_dh_auto_install:
2930
dh_install influxdb/delphix-influxdb-service influxdb/delphix-influxdb-init influxdb/perf_influxdb /usr/bin
3031
dh_install influxdb/delphix-influxdb.service /lib/systemd/system
3132
dh_install influxdb/influxdb.toml influxdb/influxdb-init.conf /etc/influxdb
33+
dh_install build/influxdb/influxdb.conf /opt/delphix/server/etc/nginx/conf.d

influxdb/influxdb-nginx.conf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2026 by Delphix. All rights reserved.
3+
#
4+
# Proxy InfluxDB 2.x API through nginx so external clients (DCT, Grafana)
5+
# can reach it over HTTPS using the engine's existing TLS certificate.
6+
# InfluxDB itself binds to 127.0.0.1:8086 (HTTP, localhost only).
7+
#
8+
location /influxdb/ {
9+
proxy_pass http://127.0.0.1:8086/;
10+
proxy_set_header Host $http_host;
11+
proxy_set_header X-Real-IP $remote_addr;
12+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
13+
proxy_set_header X-Forwarded-Proto $scheme;
14+
proxy_http_version 1.1;
15+
proxy_read_timeout 999d;
16+
proxy_buffering off;
17+
}

0 commit comments

Comments
 (0)