[consulting] Running Drupal behind Reverse Proxy Server

Frank Nikola fnikola at cognisync.com
Fri Nov 19 05:47:15 UTC 2010


Hi Chris,

 

Without any session clause in the Pound configuration file how is the
reverse proxy maintaining sessions while load balancing?

 

Thanks,

Frank

 

From: consulting-bounces at drupal.org [mailto:consulting-bounces at drupal.org]
On Behalf Of Chris Johnson
Sent: Tuesday, November 16, 2010 1:58 PM
To: A list for Drupal consultants and Drupal service/hosting providers
Subject: Re: [consulting] Running Drupal behind Reverse Proxy Server

 

We run a similar configuration, Pound in front of 2 web servers, with
multiple hostnames (foo.example.com, bar.example.com, woof.example.com).

 

Using Drupal 6, the only configuration changes we have to support this are:

 

$conf = array(

   'reverse_proxy' => TRUE,

   'reverse_proxy_addresses' => array('10.4.1.18'),

 );

 

We do not use any Session clause in our Service specification in the Pound
configuration.  It seems to work fine without it.  (I did not set it up
myself.)  That is, there are only Backend clauses.

 

For what it's worth.

..chris

 

 

On Tue, Nov 16, 2010 at 12:42 PM, Frank Nikola <fnikola at cognisync.com>
wrote:

We are having issues with session persistence in Drupal when using the Pound
reverse proxy server. Currently, we are losing our session when clicking on
a link to add a comment to a node for subdomains only. This issue (losing
our session) does not happen when on the main domain (www.example.com), but
only when on subdomains (sub1.example.com and sub2.example.com).

 

Our current environment has the Pound reverse proxy server in front of two
Drupal web servers that are each connected to an NFS mount where the Drupal
site code exists.

 

We have made the following changes to the settings.php file as directed for
reverse proxy:

 

#Use . first because we have multiple subdomains

$cookie_domain = '.ourdomain.com';

 

$conf['reverse_proxy'] = TRUE;

 

$conf['reverse_proxy_addresses'] = array('999.999.999.99');

 

 

And have added the Drupal cookie in the reverse proxy configuration file:

 

Service

    BackEnd

        Address web.server.one.net

        Port    80

        Priority 5

    End

    BackEnd

        Address web.server.two.net

        Port    80

        Priority 5

    End

    Session

        Type    COOKIE

        ID      "session_key"

        TTL     540

    End

End

 

Is there anything else that needs to be configured to maintain session
persistence for subdomains?

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/consulting/attachments/20101119/8be24a7c/attachment.html 


More information about the consulting mailing list