# Kibana doesn't work with Nginx after update 4.1.2 to 4.2.0

**URL:** <https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572>\
**Category:** Kibana\
**Created:** [November 2, 2015, 10:26pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572 "2015-11-02T22:26:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguel\_Bessa](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Miguel\_Bessa](https://discuss.elastic.co/u/Miguel_Bessa)\
**Post date:** [November 2, 2015, 10:26pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/1 "2015-11-02T22:26:06Z")

</div>

Hi,

I'm trying to update kibana to 4.2.0, so I deleted old files on kibana folder and replace for news (downloaded in: [https://download.elastic.co/…/kibana/kibana-4.2.0-linux-x64…](https://download.elastic.co/%E2%80%A6/kibana/kibana-4.2.0-linux-x64%E2%80%A6)).  
I change kibana.yml on /config, but I can't access to new kibana on browser.

I'm using Nginx and I obtain this: "404 Not Found"

Someone can help me solve problem? What I do wrong?

Thanks.

---

<div class="post-metadata">

**Author:** ![PSi\_AU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/psi_au/32/5617_2.png) [@PSi\_AU](https://discuss.elastic.co/u/PSi_AU)\
**Post date:** [November 2, 2015, 11:15pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/2 "2015-11-02T23:15:26Z")

</div>

It's probably because the paths have changed and you'll need to update your nginx configs accordingly. It's moved to /app/kibana and /bundles.

---

<div class="post-metadata">

**Author:** ![Miguel\_Bessa](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Miguel\_Bessa](https://discuss.elastic.co/u/Miguel_Bessa)\
**Post date:** [November 2, 2015, 11:51pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/3 "2015-11-02T23:51:34Z")

</div>

After I use this at my nginx default:

location /kibana4/  
{  
proxy\_pass [http://localhost:5601/;](http://localhost:5601/;)  
proxy\_redirect [http://host:5601/](http://host:5601/) /kibana4/;  
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;  
}

What I have to change?

Thanks for help 😉

---

<div class="post-metadata">

**Author:** ![PSi\_AU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/psi_au/32/5617_2.png) [@PSi\_AU](https://discuss.elastic.co/u/PSi_AU)\
**Post date:** [November 2, 2015, 11:53pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/4 "2015-11-02T23:53:43Z")

</div>

Try this

location ~ (/app/kibana|/bundles/|/kibana4|/status|/plugins) {  
proxy\_pass [http://localhost:5601](http://localhost:5601);  
proxy\_http\_version 1.1;  
proxy\_set\_header Upgrade $http\_upgrade;  
proxy\_set\_header Connection "upgrade";  
proxy\_set\_header Host $host;  
rewrite /kibana4/(.\*)$ /$1 break;  
}

---

<div class="post-metadata">

**Author:** ![Miguel\_Bessa](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Miguel\_Bessa](https://discuss.elastic.co/u/Miguel_Bessa)\
**Post date:** [November 2, 2015, 11:59pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/5 "2015-11-02T23:59:59Z")

</div>

Doesn't work 😕

This is full configuration:

server {  
listen \*:80;

```
    server_name localhost;
    auth_basic "Restricted Access";
    auth_basic_user_file /etc/nginx/htpasswd.users;

    location /
    {
        proxy_pass http://localhost:9200;
        rewrite ^/es(.*) /$1 break;
    }
    location ~ ^/es.*$
    {
        proxy_pass http://localhost:9200;
        rewrite ^/es(.*) /$1 break;
    }
    location ~ (/app/kibana|/bundles/|/kibana4|/status|/plugins)
    {
            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;
            rewrite /kibana4/(.*)$ /$1 break;
    }
   location ~ ^/kopf.*$
    {
        proxy_pass http://localhost:9200;
        proxy_read_timeout 90;
       rewrite ^/kopf(.*) /_plugin/kopf/$1 break;
    }
    location ~ ^/HQ.*$
    {
        proxy_pass http://localhost:9200;
        rewrite ^/HQ(.*) /_plugin/HQ/$1 break;
    }
    location ~ ^/marvel.*$
    {
        proxy_pass http://localhost:9200;
        rewrite ^/marvel(.*) /_plugin/marvel/$1 break;
    }

    error_page 403 /error/403.html;
    error_page 404 /error/404.html;
    error_page 405 /error/405.html;
    error_page 500 501 502 503 504 /error/5xx.html;

    location ^~ /error/
    {
        internal;
        root /var/www/default;
    }

```

}

---

<div class="post-metadata">

**Author:** ![jiangrzh](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@jiangrzh](https://discuss.elastic.co/u/jiangrzh)\
**Post date:** [November 3, 2015, 3:50am UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/6 "2015-11-03T03:50:41Z")

</div>

> [@Miguel\_Bessa](#):
>
> location ~ (/app/kibana|/bundles/|/kibana4|/status|/plugins)

try to use：  
location ~ (/app/kibana|/bundles/|/kibana4|/status|/plugins|/elasticsearch/)

---

<div class="post-metadata">

**Author:** ![Miguel\_Bessa](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Miguel\_Bessa](https://discuss.elastic.co/u/Miguel_Bessa)\
**Post date:** [November 3, 2015, 10:26am UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/7 "2015-11-03T10:26:49Z")

</div>

Doesn't work to 😕  
It can other configuration problem?  
I just replace old files for news and edit kibana.yml and default file of nginx (presented here).

---

<div class="post-metadata">

**Author:** ![Miguel\_Bessa](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Miguel\_Bessa](https://discuss.elastic.co/u/Miguel_Bessa)\
**Post date:** [November 3, 2015, 12:15pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/8 "2015-11-03T12:15:42Z")

</div>

Somenone know whats de default page of kibana? On kibana 4.1.2 default page was index.html and location of this file was "kibana/src/public". And for kibana 4.2.0 what is the default file and location?

---

<div class="post-metadata">

**Author:** ![Thorsten\_Nickel](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@Thorsten\_Nickel](https://discuss.elastic.co/u/Thorsten_Nickel)\
**Post date:** [November 3, 2015, 1:00pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/9 "2015-11-03T13:00:52Z")

</div>

Hi there,

I somehow managed to get this to work, although I'm no nginx specialist, just tried some tricks here and there....  
I did a location paragraph for all the different requests:

```
location /kibana {
    proxy_pass http://127.0.0.1:5601/app/kibana;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
}

location /bundles {
    proxy_pass http://127.0.0.1:5601/bundles;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
}

location /elasticsearch {
    proxy_pass http://127.0.0.1:5601/elasticsearch;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
}
location /plugins {
    proxy_pass http://127.0.0.1:5601/plugins;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
}
location /app/ {
    proxy_pass http://127.0.0.1:5601/app/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
}

```

This way I kinda made it work..... Perhaps this can be made smaller in a way...

This way I can call kibana by simply appending /kibana to my server URL.

Hope to help,  
Thorsten

---

<div class="post-metadata">

**Author:** ![Carlos\_Vega\_Moreno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_vega_moreno/32/3773_2.png) [@Carlos\_Vega\_Moreno](https://discuss.elastic.co/u/Carlos_Vega_Moreno)\
**Post date:** [November 3, 2015, 4:18pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/10 "2015-11-03T16:18:47Z")

</div>

So, none gave a solution. There is a workaround which is the one posted by @Thorsten_Nickel but there is no official solution to this. @jiangrzh and @PSi_AU propose the **location ~(/app/kibana|/bundles/|/kibana4|/status|/plugins)** fix but that's not a solution because we want to keep kibana on a different path, like my\_host.com/kibana instead of my\_host.com

I'm also looking for a solution. Anything new?

---

<div class="post-metadata">

**Author:** ![Miguel\_Bessa](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Miguel\_Bessa](https://discuss.elastic.co/u/Miguel_Bessa)\
**Post date:** [November 3, 2015, 4:30pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/11 "2015-11-03T16:30:38Z")

</div>

Nothing until now. I'm trying reinstall full stack to see if works.

---

<div class="post-metadata">

**Author:** ![Miguel\_Bessa](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Miguel\_Bessa](https://discuss.elastic.co/u/Miguel_Bessa)\
**Post date:** [November 4, 2015, 12:34pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/12 "2015-11-04T12:34:10Z")

</div>

Thanks Thorsten\_Nickel for your help, really it works.  
Here is my full configuration of nginx default file (I'm using kibana, elasticsearch, kopf and Elastic HQ):

server  
{  
listen 80;  
server\_name localhost;  
auth\_basic "Restricted Access";  
auth\_basic\_user\_file /etc/nginx/htpasswd.users;

```
    location /
    {
        proxy_pass http://localhost:9200;
        rewrite ^/es(.*) /$1 break;
    }

    location ~ ^/es.*$
    {
        proxy_pass http://localhost:9200;
        rewrite ^/es(.*) /$1 break;
    }

    location /kibana 
{
        proxy_pass http://127.0.0.1:5601/app/kibana;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
}

location /bundles 
{
           proxy_pass http://127.0.0.1:5601/bundles;
         proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
}

location /elasticsearch 
{
        proxy_pass http://127.0.0.1:5601/elasticsearch;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
}

location /elasticsearch 
{
        proxy_pass http://127.0.0.1:5601/elasticsearch;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
}

location /plugins 
{
        proxy_pass http://127.0.0.1:5601/plugins;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
}

location /app/ 
{
        proxy_pass http://127.0.0.1:5601/app/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
}

 location ~ ^/kopf.*$
    {
        proxy_pass http://localhost:9200;
        proxy_read_timeout 90;
        rewrite ^/kopf(.*) /_plugin/kopf/$1 break;
    }

    location ~ ^/hq.*$
    {
        proxy_pass http://localhost:9200;
        rewrite ^/hq(.*) /_plugin/hq/$1 break;
    }

    error_page 403 /error/403.html;
    error_page 404 /error/404.html;
    error_page 405 /error/405.html;
    error_page 500 501 502 503 504 /error/5xx.html;

    location ^~ /error/
    {
        internal;
        root /var/www/default;
    }

```

}

---

<div class="post-metadata">

**Author:** ![Miguel\_Bessa](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Miguel\_Bessa](https://discuss.elastic.co/u/Miguel_Bessa)\
**Post date:** [November 4, 2015, 3:05pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/13 "2015-11-04T15:05:10Z")

</div>

With this configuration we have a problem: status doesn't work.  
Have you have an idea to solve this?

---

<div class="post-metadata">

**Author:** ![Thorsten\_Nickel](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@Thorsten\_Nickel](https://discuss.elastic.co/u/Thorsten_Nickel)\
**Post date:** [November 5, 2015, 10:43am UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/14 "2015-11-05T10:43:42Z")

</div>

For later reference, this way we both have the config with nginx got to work, so maybe this will help anyone looking out...

Hi,

for reference, here the complete nginx config for all the locations I have seperated out, maybe something is missing ...

```
    location /kibana {
        proxy_pass http://127.0.0.1:5601/app/kibana;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
    location /marvel {
        proxy_pass http://127.0.0.1:5601/marvel;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
    location /bundles {
        proxy_pass http://127.0.0.1:5601/bundles;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
    location /elasticsearch {
        proxy_pass http://127.0.0.1:5601/elasticsearch;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
    location /plugins {
        proxy_pass http://127.0.0.1:5601/plugins;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
    location /app/ {
        proxy_pass http://127.0.0.1:5601/app/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
    location /status/ {
        proxy_pass http://127.0.0.1:5601/status;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
    location /api/status/ {
        proxy_pass http://127.0.0.1:5601/api/status;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
    location /#/ {
        proxy_pass http://127.0.0.1:5601/app/kibana#/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }

```

Kind regards,  
Thorsten

---

<div class="post-metadata">

**Author:** ![dfr0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dfr0/32/6433_2.png) [@dfr0](https://discuss.elastic.co/u/dfr0)\
**Post date:** [November 14, 2015, 5:24am UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/15 "2015-11-14T05:24:43Z")

</div>

I have problems with the proxy redirection from apache, the kibana hang out that waiting indefinitely but i see the kibana screen.

My config:

ProxyPass [http://localhost:5601/app/kibana](http://localhost:5601/app/kibana)  
ProxyPassReverse [http://localhost:5601/app/kibana](http://localhost:5601/app/kibana)  
Order Deny,Allow  
Deny from all  
Allow from \*\*\*\*\*\*\*\*  
AuthType Basic  
AuthUserFile /etc/okn/htpasswd  
Require valid-user  
AuthName "\*\*\*\*"

---

<div class="post-metadata">

**Author:** ![Thorsten\_Nickel](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@Thorsten\_Nickel](https://discuss.elastic.co/u/Thorsten_Nickel)\
**Post date:** [November 16, 2015, 10:01am UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/16 "2015-11-16T10:01:02Z")

</div>

Above changes are for NGINX only. For Apache have a look at the redirected locations, those are the ones you have to add the ProxyPassRevers for.

Kind regards,  
Thorsten

---

<div class="post-metadata">

**Author:** ![dfr0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dfr0/32/6433_2.png) [@dfr0](https://discuss.elastic.co/u/dfr0)\
**Post date:** [November 17, 2015, 4:13am UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/17 "2015-11-17T04:13:34Z")

</div>

But my problems are with the kibana 4.2 the kibana 4.1 works great, that version 4.2 change de route / for /app/kibana.

---

<div class="post-metadata">

**Author:** ![Miguel\_Bessa](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@Miguel\_Bessa](https://discuss.elastic.co/u/Miguel_Bessa)\
**Post date:** [November 19, 2015, 11:04pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/18 "2015-11-19T23:04:21Z")

</div>

But you need to have defined route /

My example:

server  
{  
listen 80;  
server\_name 127.0.0.1;  
auth\_basic "Restricted Access";  
auth\_basic\_user\_file /etc/nginx/htpasswd.users;

```
    location /
    {
        proxy_pass http://127.0.0.1:9200;
        rewrite ^/es(.*) /$1 break;
    }

    location /kibana
    {
        proxy_pass http://127.0.0.1:5601/app/kibana;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }

location /bundles
    {
        proxy_pass http://127.0.0.1:5601/bundles;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }

    location /elasticsearch
    {
        proxy_pass http://127.0.0.1:5601/elasticsearch;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }

location /plugins
    {
        proxy_pass http://127.0.0.1:5601/plugins;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }

    location /app/
    {
        proxy_pass http://127.0.0.1:5601/app/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }

 location /status/
    {
        proxy_pass http://127.0.0.1:5601/status;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }

    location /api/status/
    {
        proxy_pass http://127.0.0.1:5601/api/status;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }

    location /#/
    {
        proxy_pass http://127.0.0.1:5601/app/kibana#/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
    error_page 403 /error/403.html;
    error_page 404 /error/404.html;
    error_page 405 /error/405.html;
    error_page 500 501 502 503 504 /error/5xx.html;

location ^~ /error/
    {
        internal;
        root /var/www/default;
    }

```

}

---

<div class="post-metadata">

**Author:** ![Marcin\_Kubica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_kubica/32/5614_2.png) [@Marcin\_Kubica](https://discuss.elastic.co/u/Marcin_Kubica)\
**Post date:** [November 21, 2015, 8:50pm UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/19 "2015-11-21T20:50:14Z")

</div>

HI, here's my simple ngnix config which worked with Kibana 4.1.2 and works with 4.2.0 equally with no modification.

```auto
    listen 80;
    server_name kibana;

    error_log /var/log/nginx/kibana.error.log;
        access_log /var/log/nginx/kibana.access.log;

     location / {
        rewrite ^/(.*) /$1 break;
        proxy_ignore_client_abort on;
        proxy_pass http://localhost:5601;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
       
        }
}

```

---

<div class="post-metadata">

**Author:** ![dfr0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dfr0/32/6433_2.png) [@dfr0](https://discuss.elastic.co/u/dfr0)\
**Post date:** [November 26, 2015, 5:54am UTC](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572/20 "2015-11-26T05:54:23Z")

</div>

Well i solved my problems with the following apache configuration:

Timeout 3200  
ProxyTimeout 3200

ProxyRequests Off  
ProxyPreserveHost On

Redirect /goknlogs /app/kibana

Redirect /goknels /elasticsearch

ProxyPass /status http://**:5601/status  
ProxyPassReverse /status http://**\*\*\*\*:5601/status

ProxyPass /api/status http://\*\*\*\*\*\*:5601/api/status  
ProxyPassReverse /api/status http://\*\*\*\*\*\*:5601/api/status

ProxyPass /app/kibana http://\*\***:5601/app/kibana  
ProxyPassReverse /app/kibana http://**:5601/app/kibana

ProxyPass /app/marvel http://**_:5601/app/marvel  
ProxyPassReverse /app/marvel http://_**\*\*\*:5601/app/marvel

ProxyPass /api/marvel http://**:5601/api/marvel  
ProxyPassReverse /api/marvel http://**:5601/api/marvel

ProxyPass /bundles http://**:5601/bundles  
ProxyPassReverse /bundles http://**:5601/bundles

ProxyPass /elasticsearch http://\*\*\*\*\*\*\*\*\*\*\*\*:9200  
ProxyPassReverse /elasticsearch http://\*\*\*\*\*\*\*\*\*\*\*\*:9200

\<Proxy http://\*\*\*\*\*\***_:5601/\>  
Order Deny,Allow  
Deny from all  
Allow from \*\*\*\*\*\*  
AuthType Basic  
AuthName " log Server"  
AuthUserFile /etc/_**/htpasswd.controlusers  
Require valid-user

\<Proxy http://\***_:9200/\>  
Order Deny,Allow  
Deny from all  
Allow from \*\*\*\*\*\*\*\*  
AuthType Basic  
AuthName " ELS Server"  
AuthUserFile /etc/_**/htpasswd.controlusers  
Require valid-user

Works great!!!!!! i hope help the people

[Next page](https://discuss.elastic.co/t/kibana-doesnt-work-with-nginx-after-update-4-1-2-to-4-2-0/33572.md?page=2)
