Hello,
Ive been trying to solve that for last 4 hours....
Im running:
- Lighthttpd 1.4.28
- WordPress 3.0.4
(- WordPress MU Domain Mapping 0.5.3)
My site was running on a server with Apache2 and the same configuration, and all was working right.
I moved the site to another server, and at the same time I switched to lighthttpd.
So I backed up DB and site, and installed in on new server, etc..
All is working right, but the images are not displaying for all MU sites (the display only for the main site, not the new sites created with MU)
Here is my lighthttpd.conf width mod_rewrite on :
#MAIN WP MU SITE :
$HTTP["host"] =~ "www.XXX.com" {
server.document-root = "/var/www/www.XXX.com/htdocs"
server.errorlog = "/var/log/lighttpd/www.XXX.com/error.log"
accesslog.filename = "/var/log/lighttpd/www.XXX.com/access.log"
var.wpdir = "/"
include "wp-rewrite.conf"
}
#ALL SUBDOMAINS MU SITES :
$HTTP["host"] =~ "www.YYY.com" {
server.document-root = "/var/www/www.XXX.com/htdocs"
server.errorlog = "/var/log/lighttpd/www.XXX.com/error.log"
accesslog.filename = "/var/log/lighttpd/www.XXX.com/access.log"
#server.error-handler-404 = "/e404.php"
#server.error-handler-404 = "/index.php?error=404"
var.wpdir = "/"
include "wp-rewrite.conf"
}
$cat wp-rewrite.conf
server.error-handler-404 = "/index.php"
url.rewrite-once = (
"^/(.*/)?files/$" => "/index.php",
"^/(.*/)?files/(.*)" => "/wp-includes/ms-files.php?file=$2",
"^(/wp-admin/.*)" => "$1",
"^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "/$2",
"^/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "/$2"
)
So I've been working on that for 4+ hours, and I do not see what to do...
Sum up:
- Images uploaded are working OK for the main site
- Images uploaded are NOT displaying at all for all the sub sites created with WPMU on all other domains. (they give a 404 error)
Note :
- I still can access the images on all MU sites using the URLs :
http://www.YYY.com/wp-includes/ms-files.php?file=/2011/02/IMAGEFILE.png
AND
http://www.YYY.com/wp-content/blogs.dir/4/files/2011/02/IMAGEFILE.png
those 2 urls are working but not the main URL for the images that sould be
http://www.YYY.com/files/2011/02/IMAGEFILE.png
and as WP uses this URL to display images, NONE of the images are showing up either on the MU SITES or in the MU ADMIN SITES PANEL.
Any help to get those images working right is greatly appreciated..
THANKS..