NGINX config multi site Image are not displaying on Sub domains

I don’t know is the is anybody who can help me I need an expert advice
or somebody who encountered this problem. Here is a problem can’t figer
out what is the problem with my set up.

[email protected]@@_______________________________________________________________

Images on sub domains are not displaying properly the main domain images
are working.
I don’t know if the is an options in wp I am not awere of or it is my
setup


Below are my nginx config

RUNNING NGINX+FASTCGI ON DEBIAN.
_

server{
server_name *.mysite.com mysite.com http://www.mysite.com;
listen 80;
#on server block
##necessary if using a multi-site plugin
server_name_in_redirect off;
##necessary if running Nginx behind a reverse-proxy
port_in_redirect off;
access_log /var/log/nginx/localhost.access.log;

location / {
root /var/www/mysite;
index index.html index.htm index.php;

if the requested file exists, return it immediately

if (-f $request_filename) {
break;
}

W3 Total CACHE BEGIN

set $totalcache_file ‘’;
set $totalcache_uri $request_uri;

if ($request_method = POST) {
set $totalcache_uri ‘’;
}

Using pretty permalinks, so bypass the cache for any query string

if ($query_string) {
set $totalcache_uri ‘’;
}

if ($http_cookie ~* “comment_author_|wordpress|wp-postpass_” ) {
set $totalcache_uri ‘’;
}

if we haven’t bypassed the cache, specify our totalcache file

if ($totalcache_uri ~ ^(.+)$) {
set $totalcache_file /wp-content/w3tc-$http_host/pgcache/$1/_index.html;
}

only rewrite to the totalcache file if it actually exists

if (-f $document_root$totalcache_file) {
rewrite ^(.*)$ $totalcache_file break;
}

##W3 Total CACHE END

all other requests go to WordPress

if (!-e $request_filename) {
rewrite . /index.php last;
}
}

Images and static content is treated different

location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
root /var/www/mysite;
}

location ~ .php$ {
include /usr/local/nginx/conf/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/mysite$fastcgi_script_name;
}
}


Everything else is default
http://subdomain.main.com/files/2010/11/5537445.jpg
Links to images are as follows
and blogs.dir folder

I think the is a error in my

location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
root /var/www/mysite;
}

If anybody have a solution it will be really appreciated.

Hello!

On Mon, Nov 29, 2010 at 09:56:52AM +0100, Alex Kolobok wrote:


Below are my nginx config

[…]

Images and static content is treated different

location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
root /var/www/mysite;
}

You explicitly instructed nginx to look for images (and other
static files) under /var/www/mysite. There is no surprise it does
what you said to.

Maxim D.

I am sorry so what would be my solution for this problem what would be
the correct configuration

All of the images located in the
++blogs.dir++ each newly created blog is assign a number >

I have just checked the direct link
http://subdomain.main.com/wp-content/blogs.dir/135/files/2010/11/file11.jpg
image displaying so it is some were in the path.

How would I rewrite this or else what would be the rational decision for
that config.

Sincerely,

Got it

rewrite ^./files/(.)$ /wp-includes/ms-files.php?file=$1 last;
if (!-e $request_filename) {

Instead !!!

Sincerely,