Skip to content

Instantly share code, notes, and snippets.

@loctanvo
Forked from thisismitch/nginx.conf
Last active April 7, 2016 19:55
Show Gist options
  • Save loctanvo/a8180d6e2f84d1d4bb5c to your computer and use it in GitHub Desktop.
Save loctanvo/a8180d6e2f84d1d4bb5c to your computer and use it in GitHub Desktop.
# Nginx proxy for Elasticsearch + Kibana
# If you use this, you'll want to point config.js at http://FQDN:80/ instead of
# http://FQDN:9200
server {
listen *:80 ;
server_name kibana.myhost.org;
access_log /var/log/nginx/kibana.myhost.org.access.log;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
location / {
root /var/www/kibana3;
index index.html index.htm;
}
location ~ ^/_aliases$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/.*/_aliases$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/_nodes$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/_bulk$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/.*/_search$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/.*/_mapping {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
}
location ~ ^/kibana-int/dashboard/.*$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
limit_except GET {
proxy_pass http://127.0.0.1:9200;
}
}
location ~ ^/kibana-int/temp.*$ {
proxy_pass http://127.0.0.1:9200;
proxy_read_timeout 90;
limit_except GET {
proxy_pass http://127.0.0.1:9200;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment