# Elk 1.4.2 + kibana-3.1.2 Connection Failed, add "http.cors.enabled: true" does not help

**URL:** <https://discuss.elastic.co/t/elk-1-4-2-kibana-3-1-2-connection-failed-add-http-cors-enabled-true-does-not-help/21706>\
**Category:** Elasticsearch\
**Created:** [January 19, 2015, 8:05am UTC](https://discuss.elastic.co/t/elk-1-4-2-kibana-3-1-2-connection-failed-add-http-cors-enabled-true-does-not-help/21706 "2015-01-19T08:05:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EShen](https://avatars.discourse-cdn.com/v4/letter/e/b3f665/32.png) [@EShen](https://discuss.elastic.co/u/EShen)\
**Post date:** [January 19, 2015, 8:05am UTC](https://discuss.elastic.co/t/elk-1-4-2-kibana-3-1-2-connection-failed-add-http-cors-enabled-true-does-not-help/21706/1 "2015-01-19T08:05:15Z")

</div>

1. install elastic search 1.4.2 (up and running [http://hostip:9200](http://hostip:9200) works)
2. install kibana 3.1.2
3. install lighthttpd.  
1,2,3 are in the same node.  
1,2,3 are run by same user/group.  
Could anyone help?

configuration is below.  
1-elastic-search-config. add line in elasticsearch.yml: http.cors.enabled:  
true  
2-kibana config: add one line in /var/www/kibana3/config.js: elasticsearch:  
"[http://localhost:9200](http://localhost:9200)",  
3.-lighthttpd config: /etc/lighttpd/conf.d/kibana3.conf

\<VirtualHost \*:80\>

#ServerName FQDN

DocumentRoot /var/www/kibana3

\<Directory /var/www/kibana3\>

```
Allow from all

Options -Multiviews

```

LogLevel debug

ErrorLog /var/log/lighthttpd/error\_log

CustomLog /var/log/lighthttpd/access\_log combined

# Set global proxy timeouts

\<Proxy [http://127.0.0.1:9200](http://127.0.0.1:9200)\>

```
ProxySet connectiontimeout=5 timeout=90

```

# Proxy for \_aliases and .\*/\_search

\<LocationMatch  
"^/(\_nodes|\_aliases|._/\_aliases|\_search|._/\_search|\_mapping|.\*/\_mapping)$"\>

```
ProxyPassMatch http://127.0.0.1:9200/$1

ProxyPassReverse http://127.0.0.1:9200/$1

```

# Proxy for kibana-int/{dashboard,temp} stuff (if you don't want auth on

/, then you will want these to be protected)

\<LocationMatch "^/(kibana-int/dashboard/|kibana-int/temp)(.\*)$"\>

```
ProxyPassMatch http://127.0.0.1:9200/$1$2

ProxyPassReverse http://127.0.0.1:9200/$1$2

```

# 

# AuthType Basic

# AuthBasicProvider file

# AuthName "Restricted"

# AuthUserFile /etc/lighthttpd/conf.d/kibana-htpasswd

# Require valid-user

# 

/etc/lighthttpd/lighthttpd.conf:

server.modules = (

```
    "mod_access",

    "mod_alias",

    "mod_compress",

    "mod_redirect",

```

# "mod\_rewrite",

)

server.document-root = "/var/www"

server.upload-dirs = ( "/var/cache/lighttpd/uploads" )

server.errorlog = "/var/log/lighttpd/error.log"

server.pid-file = "/var/run/lighttpd.pid"

server.username = "myusernamerunelk"

server.groupname = "myusergrouprunelk"

index-file.names = ( "index.php", "index.html",

```
                            "index.htm", "default.htm",

                           " index.lighttpd.html" )

```

url.access-deny = ( "~", ".inc" )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

## Use ipv6 if available

#include\_shell "/usr/share/lighttpd/use-ipv6.pl"

dir-listing.encoding = "utf-8"

server.dir-listing = "enable"

compress.cache-dir = "/var/cache/lighttpd/compress/"

compress.filetype = ( "application/x-javascript", "text/css",  
"text/html", "text/plain" )

include\_shell "/usr/share/lighttpd/create-mime.assign.pl"

include\_shell "/usr/share/lighttpd/include-conf-enabled.pl"

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ded075ac-5074-468d-88b1-8da76dffe842%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ded075ac-5074-468d-88b1-8da76dffe842%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Akumar](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@Akumar](https://discuss.elastic.co/u/Akumar)\
**Post date:** [January 20, 2015, 9:23pm UTC](https://discuss.elastic.co/t/elk-1-4-2-kibana-3-1-2-connection-failed-add-http-cors-enabled-true-does-not-help/21706/2 "2015-01-20T21:23:39Z")

</div>

Remove the Kibana directory and reinstall it. That is the only thing that  
worked for me. Could not figure out what to clear.

Ash

On Monday, January 19, 2015 at 3:05:15 AM UTC-5, EShen wrote:

> 1. install Elasticsearch 1.4.2 (up and running [http://hostip:9200](http://hostip:9200) works)
> 2. install kibana 3.1.2
> 3. install lighthttpd.  
> 1,2,3 are in the same node.  
> 1,2,3 are run by same user/group.  
> Could anyone help?
> 
> configuration is below.  
> 1-elastic-search-config. add line in elasticsearch.yml: http.cors.enabled:  
> true  
> 2-kibana config: add one line in /var/www/kibana3/config.js: elasticsearch:  
> "[http://localhost:9200](http://localhost:9200)",  
> 3.-lighthttpd config: /etc/lighttpd/conf.d/kibana3.conf
> 
> \<VirtualHost \*:80\>
> 
> #ServerName FQDN
> 
> DocumentRoot /var/www/kibana3
> 
> \<Directory /var/www/kibana3\>
> 
> ```
> Allow from all
> 
> Options -Multiviews
> 
> ```
> 
> LogLevel debug
> 
> ErrorLog /var/log/lighthttpd/error\_log
> 
> CustomLog /var/log/lighthttpd/access\_log combined
> 
> # Set global proxy timeouts
> 
> \<Proxy [http://127.0.0.1:9200](http://127.0.0.1:9200)\>
> 
> ```
> ProxySet connectiontimeout=5 timeout=90
> 
> ```
> 
> # Proxy for \_aliases and .\*/\_search
> 
> \<LocationMatch  
> "^/(\_nodes|\_aliases|._/\_aliases|\_search|._/\_search|\_mapping|.\*/\_mapping)$"\>
> 
> ```
> ProxyPassMatch http://127.0.0.1:9200/$1
> 
> ProxyPassReverse http://127.0.0.1:9200/$1
> 
> ```
> 
> # Proxy for kibana-int/{dashboard,temp} stuff (if you don't want auth on
> 
> /, then you will want these to be protected)
> 
> \<LocationMatch "^/(kibana-int/dashboard/|kibana-int/temp)(.\*)$"\>
> 
> ```
> ProxyPassMatch http://127.0.0.1:9200/$1$2
> 
> ProxyPassReverse http://127.0.0.1:9200/$1$2
> 
> ```
> 
> # 
> 
> # AuthType Basic
> 
> # AuthBasicProvider file
> 
> # AuthName "Restricted"
> 
> # AuthUserFile /etc/lighthttpd/conf.d/kibana-htpasswd
> 
> # Require valid-user
> 
> # 
> 
> /etc/lighthttpd/lighthttpd.conf:
> 
> server.modules = (
> 
> ```
> "mod_access",
> 
> "mod_alias",
> 
> "mod_compress",
> 
> "mod_redirect",
> 
> ```
> 
> # "mod\_rewrite",
> 
> )
> 
> server.document-root = "/var/www"
> 
> server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
> 
> server.errorlog = "/var/log/lighttpd/error.log"
> 
> server.pid-file = "/var/run/lighttpd.pid"
> 
> server.username = "myusernamerunelk"
> 
> server.groupname = "myusergrouprunelk"
> 
> index-file.names = ( "index.php", "index.html",
> 
> ```
> "index.htm", "default.htm",
> 
> " index.lighttpd.html" )
> 
> ```
> 
> url.access-deny = ( "~", ".inc" )
> 
> static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
> 
> ## Use ipv6 if available
> 
> #include\_shell "/usr/share/lighttpd/use-ipv6.pl"
> 
> dir-listing.encoding = "utf-8"
> 
> server.dir-listing = "enable"
> 
> compress.cache-dir = "/var/cache/lighttpd/compress/"
> 
> compress.filetype = ( "application/x-javascript", "text/css",  
> "text/html", "text/plain" )
> 
> include\_shell "/usr/share/lighttpd/create-mime.assign.pl"
> 
> include\_shell "/usr/share/lighttpd/include-conf-enabled.pl"

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f35b696c-0738-4758-a696-dc7885ddf8bd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f35b696c-0738-4758-a696-dc7885ddf8bd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:37am UTC](https://discuss.elastic.co/t/elk-1-4-2-kibana-3-1-2-connection-failed-add-http-cors-enabled-true-does-not-help/21706/3 "2017-07-06T00:37:39Z")

</div>


