1234567891011121314151617181920 |
- #
- # this is the nginx config for elasticsearch with authentication for remote login
- # you need to create the auth file /etc/nginx/.htpasswd-elasticsearch with you username and password
- # this can be done on the shell via: 'htpasswd -b -c /etc/nginx/.htpasswd-elasticsearch USERNAME PASSWORD'
- #
- upstream elasticsearch {
- server 127.0.0.1:9200;
- }
- server {
- listen 9200;
- auth_basic "Elasticsearch";
- auth_basic_user_file /etc/nginx/.htpasswd-elasticsearch;
- location / {
- proxy_pass http://elasticsearch;
- }
- }
|