I am trying to get Lucee and Load balancing working but with little success.
I am currently storing my sessions in a database (that works fine) but when I use upstream the session are lost.
Here’s my App.cfc settings for session
this.sessioncookie.httponly = true;
this.sessionTimeout = createTimeSpan(0,3,0,0);
this.sessionType = "cfml";
this.setDomainCookies = false;
this.clientManagement = false;
this.setClientCookies = false;
this.sessionStorage = "sstorage";
this.sessionManagement = true;
And here is my Nginx code
upstream lucee_servers {
server 127.0.0.1:8052;
server 127.0.0.1:8053;
}
server {
server_name example.com.local;
root /var/www/html/;
location ~ \.(cfm|cfml|cfc|jsp|cfr)(.*)$ {
add_header X-Upstream $upstream_addr always; #so I know which upstream is being used
set $path_info $request_uri;
proxy_pass http://lucee_servers;
proxy_read_timeout 100s;
proxy_redirect off;
proxy_set_header Host $host;
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_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Tomcat-DocRoot $document_root;
proxy_set_header X-ModCFML-SharedKey 8DoB0PzqdMn4zo0Y2bq7dzqynbqBVsK0piuNslpNU6982KaiCqVT8X;
}
}
Is there anything I am missing?