Skip to content

Instantly share code, notes, and snippets.

@marufeuille
Last active July 26, 2016 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marufeuille/31a06f334af430aaf1864c9e9800fd3b to your computer and use it in GitHub Desktop.
Save marufeuille/31a06f334af430aaf1864c9e9800fd3b to your computer and use it in GitHub Desktop.
AWSのElasticSearchのkibanaにnginxでBasic認証をかける ref: http://qiita.com/marufeuille/items/cb0c98fd0134cc1ae174
server {
server_name XXXXXX.ap-northeast-1.compute.amazonaws.com;
location / {
proxy_pass http://XXXXXXX.ap-northeast-1.es.amazonaws.com/;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
{"message":"Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic XXXXXXXX"}
server {
server_name XXXXXX.ap-northeast-1.compute.amazonaws.com;
location / {
proxy_pass http://XXXXXXX.ap-northeast-1.es.amazonaws.com/;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_set_header Authorization "";
}
}
server {
server_name XXXXXX.ap-northeast-1.compute.amazonaws.com;
location / {
proxy_pass http://XXXXXXX.ap-northeast-1.es.amazonaws.com/_plugin/kibana/;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_set_header Authorization "";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment