Welcome! Log In Create A New Profile

Advanced

Session Cookies and Load Balancing

Posted by sloxx 
Session Cookies and Load Balancing
February 08, 2011 11:14AM
Hi!

I'm currently trying to setup nginx as a load balancer in front of two Apache Servers running a PHP application. This basically works, but I'm having problems with session cookies. The PHP application output the following error: "Please enable session cookies in your browser!"

So somehow the session handling is not working.

Here is my current setup:


http {
upstream ilias {
ip_hash;
server 10.211.55.12;
server 10.211.55.15;
}

server {
listen 80;
server_name lb.cluster;
location / {
proxy_set_header Host $host;
proxy_pass http://ilias/ilias/;
proxy_pass_header Set-Cookie;
proxy_read_timeout 20;
proxy_connect_timeout 10;
}
}
}

Has anyone got an idea how to pass the session information from Apache/PHP through nginx to the Browser and back?

Thanks!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 283
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready