Skip to content

Instantly share code, notes, and snippets.

@trevorwhitney
Created January 28, 2022 18:18
Show Gist options
  • Save trevorwhitney/2cb36627e7b4e939b80c6c3c9bd12a75 to your computer and use it in GitHub Desktop.
Save trevorwhitney/2cb36627e7b4e939b80c6c3c9bd12a75 to your computer and use it in GitHub Desktop.
nginx conf for loki simple scalable deployment
server {
listen 8080;
location = / {
return 200 'OK';
auth_basic off;
}
location = /api/prom/push {
proxy_pass http://<WRITE_IP>:3100$request_uri;
}
location = /api/prom/tail {
proxy_pass http://<READ_IP>:3100$request_uri;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~ /api/prom/.* {
proxy_pass http://<READ_IP>:3100$request_uri;
}
location = /loki/api/v1/push {
proxy_pass http://<WRITE_IP>:3100$request_uri;
}
location = /loki/api/v1/tail {
proxy_pass http://<READ_IP>:3100$request_uri;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~ /loki/api/.* {
proxy_pass http://<READ_IP>:3100$request_uri;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment