PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

s2Member + Squid reverse proxy

s2Member Plugin. A Membership plugin for WordPress®.

s2Member + Squid reverse proxy

Postby johnmont » June 19th, 2010, 10:53 am

I'm curious if anyone has used s2 with Squid as a reverse proxy for caching (it passes requests on to apache). We use this and it works tremendously to speed up the site. However, it appears to break s2 as a user is able to view restricted posts when not logged in. Turning off squid fixes this problem.

Some notes

1. With Squid on, the correct text is displayed in the post when embedding php code in the post. So if we add that test php code including this :
Code: Select all
<?php } else { ?>
    Some public content.
<?php } ?>

The post does actually show "Some public content." (or the other appropriate text based upon member level). So that part seems to be working.

2. I thought it might be an IP address issue, since that doesn't get passed to apache and instead the $_SERVER['HTTP_X_FORWARDED_FOR'] variable is the one that contains the actual user IP. So I found where IP address logging is located in the s2Member includes/functions, modified the file, and s2 correctly got the IP address. But this didn't fix the problem.

3. Turning off squid fixes the problem.

I'm curious if anyone has any suggestions as to what is or isn't making it through to WordPress

Thanks
User avatar
johnmont
Registered User
Registered User
 
Posts: 10
Joined: May 15, 2010

Re: s2Member + Squid reverse proxy

Postby Jason Caldwell » June 19th, 2010, 12:06 pm

Hi John. I've not used Squid Proxy before, but I know that s2Member ( w/ Quick Cache ) works very well together. I wrote both of these plugins; and they've been matched up to work together seamlessly.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests

cron