LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-23-2009, 10:20 AM   #1
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Rep: Reputation: 30
apache sticky session


Hi
i cannot get the sticky session to work here is my config
[load balancer]
<VirtualHost 192.168.2.210:80>
ServerName test12.com
DocumentRoot /var/www/html/
ProxyRequests Off
ErrorLog "/etc/httpd/logs/proxyer.log"
CustomLog "/etc/httpd/logs/proxyac.log" combined
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/ lbmethod=byrequests stickysession=BALANCEID

ProxyPassReverse / http://test12.com/
ProxyPassReverse / http://test12.com/
<Proxy balancer://mycluster>
BalancerMember http://http1.test12.com route=http1
BalancerMember http://http2.test12.com route=http2
#ProxySet lbmethod=byrequests
</Proxy>

<Location /balancer-manager>
SetHandler balancer-manager

Order deny,allow
Allow from all
</Location>
</VirtualHost>

[Server1]
<VirtualHost *:80>
ServerName http1.test12.com
DocumentRoot /var/www/html/test
RewriteEngine On
RewriteRule .* - [CO=BALANCEID:balancer.http1.test12.com]

TimeOut 300
DirectoryIndex index.php
<Directory "/var/www/html/test/">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>

[Server 2]
<VirtualHost *:80>
ServerName http2.test12.com
DocumentRoot /var/www/html/test
RewriteEngine On
RewriteRule .* - [CO=BALANCEID:balancer.http2.test12.com]

TimeOut 300
DirectoryIndex index.php
<Directory "/var/www/html/test/">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>

but i still get on different servers each time i refresh can anyone help
 
Old 04-24-2009, 03:18 AM   #2
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Original Poster
Rep: Reputation: 30
thanks i have figured it out
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache + multi session download managers piforever Fedora 0 07-03-2007 07:29 AM
SSL session cache Apache error log maxsanders Linux - Server 0 06-06-2007 04:16 AM
LXer: Apache: Creating A Session-Aware Loadbalancer Using mod_proxy_balancer (Debian Etch) LXer Syndicated Linux News 0 05-31-2007 08:01 PM
Apache 2 / PHP4 on Debian with session problems FlipHDK Linux - General 1 12-08-2006 08:27 AM
Apache Session Log? abelsgmx Linux - Networking 4 06-11-2002 03:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration