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

bjorntj nginx-forum at
Wed Nov 27 12:13:14 UTC 2013

I have the following config..:

server {
    listen 80;
    access_log  /var/log/nginx/site.example.com_access.log  main;

    location / {
        rewrite ^;

    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_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?



Posted at Nginx Forum:,245004,245004#msg-245004

More information about the nginx mailing list