Wordpress MU Config
merlin corey
merlincorey at dc949.org
Sat Jul 4 13:21:40 MSD 2009
On Mon, Jun 29, 2009 at 10:28 PM, Hone Watson<hone at codingstore.com> wrote:
> Merlin, how does that config account for visitors with logged in
> wordpress user cookies?
>
> With Supercache these users should not be directed to the supercached files:
>
Ah thanks, I knew there would be something. I have not tested this
yet (far too late) but something like the following should be what we
want (will verify later, again line breaks are my client):
location / {
if ($http_cookie ~* “comment_author_|wordpress|wp-postpass_” ) {
try_files $uri $uri/ /index.php?q=$uri;
break; // Not sure if needed here
}
try_files $uri $uri/
/wp-content/cache/supercache/$http_host/$uriindex.html
/index.php?q=$uri;
}
I'll also try to find a better way to do this but I think at his time
you will definitely need an if somewhere to check cookie value, though
I would like to move it out of main location if possible.
>
> On Fri, Jun 26, 2009 at 10:17 PM, merlin corey<merlincorey at dc949.org> wrote:
>> Also the line breaks are from my mail client truncating... I have it
>> all one line, but I don't think it matters for nginx.
>>
>> On Fri, Jun 26, 2009 at 5:16 AM, merlin corey<merlincorey at dc949.org> wrote:
>>> I recently setup wordpress with supercache like so:
>>>
>>> location / {
>>> try_files $uri
>>> /wp-content/cache/supercache/$http_host/$uriindex.html $uri/
>>> /index.php?q=$uri;
>>> }
>>>
>>> I believe this is an Igor-cringing-from-too-many-ifs-less
>>> configuration, but I do not guarantee the lack of any cringes
>>> whatsoever :P.
>>>
>>> On Thu, Jun 25, 2009 at 7:11 PM, Jim Ohlstein<jim.ohlstein at gmail.com> wrote:
>>>>
>>>>
>>>> Shri @ DevLib.Org wrote:
>>>>>
>>>>> Hi there,
>>>>> Does anyone have an optimized config for Wordpress MU with subdomain
>>>>> support?
>>>>
>>>> I use the config at
>>>> http://lumanau.web.id/2008/11/27/nginx-rewrite-rules-for-wordpressmu-with-wp-super-cache-plugin-enabled.html
>>>> for MU with supercache. It seems to work. I may switch to Varnish or nginx
>>>> fastcgi cache and then the rewrites are pretty trivial. If I recall
>>>> correctly the rewrites are the same for subdomain or subdirectory
>>>> configuration. It's a matter of a config setting in MU and a wildcard DNS
>>>> entry.
>>>>
>>>> Note these are not "optimized" in that they contain lots of "if" statements
>>>> and Igor would probably cringe...
>>>>>
>>>>> There are a lot of conflicting configs on the wordpress forums and I
>>>>> could not find one on the Nginx Wiki - hence the request.
>>>>> Thanks in advance!
>>>>> Regards,
>>>>> Shri
>>>>>
>>>>
>>>> Jim
>>>>
>>>>
>>>>
>>>
>>
>>
>
>
More information about the nginx
mailing list