squirrelmail 1.4.x and roundrobin haproxy

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

squirrelmail 1.4.x and roundrobin haproxy

Josef Karliak-3
   Hi there,
   I run haproxy for web server apache2, loadbalancing works good but  
Squirrelmail don't. But it is not an error of the SM - just haproxy is  
balancing between two servers, I go to login page (presume it is on  
server #1) and after I send my login and password haproxy send it to  
server #2, that do not have my credentials -> "You must be logged in  
to access this page."
   If I shutdown one of the web servers, all is all right.
   So there is a question ? Did I missed something of the settings of  
HAPROXY for Squirrelmail ?
   Thanks and best regards
   J.Karliak

--
Ma domena pouziva zabezpeceni a kontrolu SPF (www.openspf.org) a
DomainKeys/DKIM (with ADSP) . Pokud mate problemy s dorucenim emailu,
zacnete pouzivat metody overeni puvody emailu zminene vyse. Dekuji.
My domain use SPF (www.openspf.org) and DomainKeys/DKIM (with ADSP)
policy and check. If you've problem with sending emails to me, start
using email origin methods mentioned above. Thank you.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
Statistics for translations: http://l10n-stats.squirrelmail.org/
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n
Reply | Threaded
Open this post in threaded view
|

Re: squirrelmail 1.4.x and roundrobin haproxy

Paul Lesniewski
Wrong email list.  Please post any more general requests to the
squirrelmail-users mailing list.

On Fri, Feb 28, 2014 at 10:39 PM, Josef Karliak <[hidden email]> wrote:

>    Hi there,
>    I run haproxy for web server apache2, loadbalancing works good but
> Squirrelmail don't. But it is not an error of the SM - just haproxy is
> balancing between two servers, I go to login page (presume it is on
> server #1) and after I send my login and password haproxy send it to
> server #2, that do not have my credentials -> "You must be logged in
> to access this page."
>    If I shutdown one of the web servers, all is all right.
>    So there is a question ? Did I missed something of the settings of
> HAPROXY for Squirrelmail ?

You need to have PHP store its session data in a database so that both
instances can access the same user sessions.  There should be plenty
of examples and howto documents on the web to help you.  Depending how
you set this up, you may or may not also need to make use of this
information from SquirrelMail's src/login.php:

/**
 * Allow administrators to define custom session handlers
 * for SquirrelMail without needing to change anything in
 * php.ini (application-level).
 *
 * In config_local.php, admin needs to put:
 *
 *     $custom_session_handlers = array(
 *         'my_open_handler',
 *         'my_close_handler',
 *         'my_read_handler',
 *         'my_write_handler',
 *         'my_destroy_handler',
 *         'my_gc_handler',
 *     );
 *     session_module_name('user');
 *     session_set_save_handler(
 *         $custom_session_handlers[0],
 *         $custom_session_handlers[1],
 *         $custom_session_handlers[2],
 *         $custom_session_handlers[3],
 *         $custom_session_handlers[4],
 *         $custom_session_handlers[5]
 *     );

--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
Statistics for translations: http://l10n-stats.squirrelmail.org/
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n
Reply | Threaded
Open this post in threaded view
|

Re: squirrelmail 1.4.x and roundrobin haproxy [SOLVED]

Josef Karliak
     Hi,
     sorry for mailing bad list, next time.
     Anyway I've solved it in the haproxy's configuration - I used
cookie for balancing too.
     Thanks
     J.Karliak.


Dne 1.3.2014 08:45, Paul Lesniewski napsal(a):

> Wrong email list.  Please post any more general requests to the
> squirrelmail-users mailing list.
>
> On Fri, Feb 28, 2014 at 10:39 PM, Josef Karliak <[hidden email]> wrote:
>>     Hi there,
>>     I run haproxy for web server apache2, loadbalancing works good but
>> Squirrelmail don't. But it is not an error of the SM - just haproxy is
>> balancing between two servers, I go to login page (presume it is on
>> server #1) and after I send my login and password haproxy send it to
>> server #2, that do not have my credentials -> "You must be logged in
>> to access this page."
>>     If I shutdown one of the web servers, all is all right.
>>     So there is a question ? Did I missed something of the settings of
>> HAPROXY for Squirrelmail ?
> You need to have PHP store its session data in a database so that both
> instances can access the same user sessions.  There should be plenty
> of examples and howto documents on the web to help you.  Depending how
> you set this up, you may or may not also need to make use of this
> information from SquirrelMail's src/login.php:
>
> /**
>   * Allow administrators to define custom session handlers
>   * for SquirrelMail without needing to change anything in
>   * php.ini (application-level).
>   *
>   * In config_local.php, admin needs to put:
>   *
>   *     $custom_session_handlers = array(
>   *         'my_open_handler',
>   *         'my_close_handler',
>   *         'my_read_handler',
>   *         'my_write_handler',
>   *         'my_destroy_handler',
>   *         'my_gc_handler',
>   *     );
>   *     session_module_name('user');
>   *     session_set_save_handler(
>   *         $custom_session_handlers[0],
>   *         $custom_session_handlers[1],
>   *         $custom_session_handlers[2],
>   *         $custom_session_handlers[3],
>   *         $custom_session_handlers[4],
>   *         $custom_session_handlers[5]
>   *     );
>


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
Statistics for translations: http://l10n-stats.squirrelmail.org/
List address: [hidden email]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n