Created
April 2, 2019 15:46
-
-
Save stewones/f1194ad315808fb21b358904f39310bd to your computer and use it in GitHub Desktop.
elasticsearch config for nginx (say no to x-pack)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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