Nginx proxy can not start

Hello,

I just created kibana.conf on /etc/nginx/conf.d as recommended with content below:

server {
listen 80;

    server_name localhost;
    auth_basic "Restricted Access";
    auth_basic_user_file /etc/nginx/htpasswd.users;
    location / {
        proxy_pass http://localhost:5601;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

But i cannot start nginx as expected.
It's appeared error:

service nginx restart
nginx: [emerg] unknown directive "proxy_http_version" in /etc/nginx/conf.d/kibana.conf:11
nginx: configuration file /etc/nginx/nginx.conf test failed

While i used CentOS 6.6 final, logstash:1.5.2, elasticsearch: 1.7.0, Kibana 4.1.1

Any help is very appreciated,

Regards,

It's not really something we directly support, but see if any of these results help https://duckduckgo.com/?q=unknown+directive+"proxy_http_version"

Hello,

I found the solution by installed nginx version higher than version on kibana config file.

Thanks and regards,