Skip to content

Instantly share code, notes, and snippets.

@stewwan stewwan/nginx.conf
Created Apr 2, 2019

Embed
What would you like to do?
elasticsearch config for nginx (say no to x-pack)
events {
worker_connections 1024;
}
http {
upstream elasticsearch {
server 127.0.0.1:9200;
keepalive 15;
}
upstream kibana {
server 127.0.0.1:5601;
keepalive 15;
}
# elastic
server {
listen 4545;
auth_basic "You Know, for Security =x";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
proxy_pass http://elasticsearch;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
}
}
# kibana
server {
listen 4546;
auth_basic "You Know, for Security =x";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
proxy_pass http://kibana;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.