Tony Mack | b995914 | 2016-03-12 14:13:24 +0000 | [diff] [blame] | 1 | server { |
| 2 | listen 80; ## listen for ipv4; this line is default and implied |
| 3 | listen [::]:80 default ipv6only=on; ## listen for ipv6 |
| 4 | |
| 5 | # Make site accessible from http://localhost/ |
| 6 | server_name localhost; |
| 7 | |
| 8 | location = /health { |
| 9 | return 200; |
| 10 | access_log off; |
| 11 | } |
| 12 | |
| 13 | location / { |
| 14 | proxy_pass http://kibana:5601; |
| 15 | proxy_read_timeout 90; |
| 16 | |
| 17 | if ($http_x_forwarded_proto != "https") { |
| 18 | rewrite ^ https://$host$uri permanent; |
| 19 | } |
| 20 | |
| 21 | auth_basic "Restricted"; |
| 22 | auth_basic_user_file /etc/kibana/htpasswd; |
| 23 | } |
| 24 | } |