nginx related question

I am trying to set up nginx as a front end proxy to my apache2 which will continue serving php.

I have it up and ALMOST running with this config gfile:

basically it is a catch all config that works for all vhosts. except for those with multisite enabled :slight_frown:

for the multiside story, as far as I have read on the codex: I would need o modify this line:

set $site_dir $host; if ($host ~ ^www.(.*)) { set $site_dir $1; } root /var/www/$site_dir/web;

into something like this: if ($host stripped of www and any subdomains) {rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;

if (!-e $request_filename) {

rewrite ^.+?(/wp-.*) $1 last;

rewrite ^.+?(/.*.php)$ $1 last;

rewrite ^ /index.php last;

} }

basically introducing an exception for this particular domain (which is running WP with multisite and subdomains enabled)

I had followed this tutorial btw. and here is my thread on the nginx forum:,146847

guys, if I can get this done its up and running :slight_smile: