# Wordpress MU Config

**URL:** <https://www.ruby-forum.com/t/wordpress-mu-config/171080>\
**Category:** NGINX\
**Created:** [June 26, 2009, 4:03am UTC](https://www.ruby-forum.com/t/wordpress-mu-config/171080 "2009-06-26T04:03:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shri\_S\_DevLib.Org](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@Shri\_S\_DevLib.Org](https://www.ruby-forum.com/u/Shri_S_DevLib.Org)\
**Post date:** [June 26, 2009, 4:03am UTC](https://www.ruby-forum.com/t/wordpress-mu-config/171080/1 "2009-06-26T04:03:31Z")

</div>

Hi there,

Does anyone have an optimized config for Wordpress MU with subdomain  
support?

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

---

<div class="post-metadata">

**Author:** ![Shri\_S\_DevLib.Org](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@Shri\_S\_DevLib.Org](https://www.ruby-forum.com/u/Shri_S_DevLib.Org)\
**Post date:** [June 26, 2009, 4:22am UTC](https://www.ruby-forum.com/t/wordpress-mu-config/171080/2 "2009-06-26T04:22:12Z")

</div>

Shri @ [DevLib.Org](http://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](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

---

<div class="post-metadata">

**Author:** ![Shri\_S\_DevLib.Org](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@Shri\_S\_DevLib.Org](https://www.ruby-forum.com/u/Shri_S_DevLib.Org)\
**Post date:** [June 26, 2009, 2:26pm UTC](https://www.ruby-forum.com/t/wordpress-mu-config/171080/3 "2009-06-26T14:26:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Shri\_S\_DevLib.Org](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@Shri\_S\_DevLib.Org](https://www.ruby-forum.com/u/Shri_S_DevLib.Org)\
**Post date:** [June 26, 2009, 2:22pm UTC](https://www.ruby-forum.com/t/wordpress-mu-config/171080/4 "2009-06-26T14:22:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Shri\_S\_DevLib.Org](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@Shri\_S\_DevLib.Org](https://www.ruby-forum.com/u/Shri_S_DevLib.Org)\
**Post date:** [June 30, 2009, 7:40am UTC](https://www.ruby-forum.com/t/wordpress-mu-config/171080/5 "2009-06-30T07:40:28Z")

</div>

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:
