diff --git a/conf/nginx.conf b/conf/nginx.conf index 796bc81..1fb2f60 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,50 +1,51 @@ worker_processes 4; # Show startup logs on stderr; switch to debug to print, well, debug logs when # running nginx-debug error_log /dev/stderr info; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; client_max_body_size 100M; # Built-in Docker resolver. Needed to allow on-demand resolution of proxy # upstreams. resolver 127.0.0.11 valid=10s; server { listen 5081 default_server; # using variable for upstream servers is mandatory to enfore nginx # to resolve the name at each query. Otherwise, proxy_pass to # reloaded/restarted service would fail until the nginx service it # restarted location /prometheus { set $upstream "http://prometheus:9090"; proxy_pass $upstream; } location /grafana { set $upstream "http://grafana:3000"; rewrite ^/grafana/(.*)$ /$1 break; + proxy_set_header Host $http_host; proxy_pass $upstream; proxy_set_header Host $http_host; } location / { set $upstream "http://web:5004"; proxy_pass $upstream; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Host $http_host; proxy_redirect off; } } }