Last active
September 11, 2020 09:08
-
-
Save sthomp/1e9eeda7edcc69569ba2 to your computer and use it in GitHub Desktop.
nginx config to proxy connections to kibana on aws
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http{ | |
server { | |
listen 80; | |
server_name localhost; | |
# redirect / | |
location = / { | |
rewrite ^ /_plugin/kibana/ redirect; | |
} | |
# redirect /dashboard | |
location = /dashboard { | |
rewrite ^ /_plugin/kibana/#/dashboard/My-Dashboard?_g=(refreshInterval:(display:'1%20minute',section:2,value:60000),time:(from:now-7d,mode:quick,to:now)) redirect; | |
} | |
location / { | |
proxy_pass https://<my-search-domain>.us-east-1.es.amazonaws.com; | |
proxy_pass_request_headers off; | |
auth_basic "Restricted"; | |
auth_basic_user_file htpasswd; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
applying @ibrahima feedback, this works for me: