I have a cluster of webservers running on apache-php (with prefork). I'm planning to move from prefork to worker (fcgi). The problem is that I cannot move all servers at once so for a short period of times (matter of days) few of them will be on fcgi and some on modphp. I tested today if the sessions are going to work between these two kind of servers (a test server with fcgi and a real with mod_php) and looks like not, I'm getting logged out when my proxy (basic nginx) is redirecting me from a ws with fcgi to one with mod_php. The application that is hosted on these servers is a magento with few modifications (nothing on the core). If I take the proxy out, everything works perfect, I can change from a node to another and the session is the same.
Is there anything in nginx that can cause this? Below is a part of the config of nginx:
proxy_ignore_headers "Cache-Control" "Expires";
proxy_cache_valid 200 302 60m;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_max_temp_file_size 0;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 600000;
proxy_send_timeout 600000;
proxy_read_timeout 600000;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
Not an answer, but maybe a clue.
FCGI does not have x_forwarded_for. You may be all set with:
But it certainly can affect session/cookie management. We're working on a possible related issue: https://stackoverflow.com/questions/6791446/cakephp-php-user-sessions-swapping-for-a-subset-of-our-customers