Skip to content

Instantly share code, notes, and snippets.

@asigatchov
Created March 22, 2017 20:18
Show Gist options
  • Select an option

  • Save asigatchov/7db2ac06d0a089dd732b20e6fdf989f9 to your computer and use it in GitHub Desktop.

Select an option

Save asigatchov/7db2ac06d0a089dd732b20e6fdf989f9 to your computer and use it in GitHub Desktop.
Пример конфига baseauth на основе nginx
upstream elastic {
server elasticsearch:9200;
}
client_max_body_size 1G;
client_body_buffer_size 200M;
server {
listen *:9200;
server_name _;
location / {
# To add basic authentication to v2 use auth_basic setting plus add_header
auth_basic "Kibana";
auth_basic_user_file /etc/nginx/conf.d/kibana.password;
proxy_pass http://elastic;
proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900;
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