View Single Post
Old 3rd November 2010, 20:21
Ovidiu Ovidiu is offline
Senior Member
Join Date: Sep 2005
Posts: 1,269
Thanks: 84
Thanked 25 Times in 21 Posts

ok,that worked. the last step is to get an exception worked into the config file for domains that use wordpress with multisite enabled where wildcard subdomains are used.

the errors look like:

2010/11/03 19:17:28 [error] 32439#0: *3 open() "/var/www/" failed (2: No such file or directory), client:, server: _, request: "GET /wp-includes/images/adminbar.png HTTP/1.1", host: "", referrer: ""
the problem is nginx is looking for /var/www/ which does nto exist. is a virtual subdomain handled by wordpress.

so basically I need to extend this:
set $site_dir $host; if ($host ~ ^www\.(.*)) { set $site_dir $1; } root /var/www/$site_dir/web;
so that if $host is stripped of www and any subdomains and the resulting $host is these rewrite rules are executed as is multisite enabled with virtual 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;
any help out there?
Reply With Quote