# Session is not kept when using Chrome, works for Firefox and IE

**URL:** <https://www.ruby-forum.com/t/session-is-not-kept-when-using-chrome-works-for-firefox-and-ie/237744>\
**Category:** NGINX\
**Created:** [November 27, 2013, 1:14pm UTC](https://www.ruby-forum.com/t/session-is-not-kept-when-using-chrome-works-for-firefox-and-ie/237744 "2013-11-27T13:14:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [November 27, 2013, 1:14pm UTC](https://www.ruby-forum.com/t/session-is-not-kept-when-using-chrome-works-for-firefox-and-ie/237744/1 "2013-11-27T13:14:07Z")

</div>

I have the following config…:

server {  
listen 80;  
server\_name [site.example.com](http://site.example.com);  
access\_log /var/log/nginx/site.example.com\_access.log main;

```
location / {
    rewrite ^ http://site.example.com/webapp;
}

location /webapp/ {
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://10.10.10.10:8080/webapp/;
    proxy_cookie_domain 10.10.10.10 site.example.com;
    proxy_cookie_path /webapp/ /;
    client_max_body_size 32m;
    client_body_buffer_size 128k;
    proxy_connect_timeout 240;
    proxy_send_timeout 240;
    proxy_read_timeout 240;
    proxy_buffers 32 4k;
}

```

}

This config works as it should when using Firefox and IE, but not Google  
Chrome… When using Chrome, I can login to the webapp but after I am  
logged  
in and try to do something, the webapp tells me I am not logged in…  
I can see the jsessionid cookie under Settings in Chrome and it looks as  
it  
should but somehow the cookie is not used for the current session… Are  
there some special config needed for Chrome or am I missing something  
else?

Regards,

BTJ

Posted at Nginx Forum:

> **[Session is not kept when using Chrome, works for Firefox and IE.](https://forum.nginx.org/read.php?2,245004,245004#msg-245004)**
>
> I have the following config..: server { listen 80; server\_name site.example.com; access\_log /var/log/nginx/site.example.com\_access.log main; location / { rewrite ^ http://site.example.com/webapp;
