2013-07-07 03:21:12 +00:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name logs.notprod.pl;
|
2013-11-19 06:40:37 +00:00
|
|
|
root /var/www/kibana/src/;
|
2013-07-07 03:21:12 +00:00
|
|
|
|
|
|
|
# Set image format types to expire in a very long time
|
|
|
|
location ~* ^.+\.(jpg|jpeg|gif|png|ico)$ {
|
|
|
|
access_log off;
|
|
|
|
expires max;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Set css and js to expire in a very long time
|
|
|
|
location ~* ^.+\.(css|js)$ {
|
|
|
|
access_log off;
|
|
|
|
expires max;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Catchall for everything else
|
|
|
|
location / {
|
2013-11-19 06:40:37 +00:00
|
|
|
root /var/www/kibana/src/;
|
2013-07-07 03:21:12 +00:00
|
|
|
index index.html;
|
|
|
|
expires 1d;
|
|
|
|
try_files $uri/ $uri;
|
|
|
|
if (-f $request_filename) {
|
|
|
|
break;
|
|
|
|
}
|
2013-11-19 06:40:37 +00:00
|
|
|
auth_basic "Restricted";
|
|
|
|
auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd;
|
2013-07-07 03:21:12 +00:00
|
|
|
}
|
|
|
|
}
|