Worked like a charm... <br>Even tho' Chris Wells (big thanks again) suggested earlier on irc<br><br> if (!-e $request_filename) {<br> rewrite ^(.*)(/wp-content/themes/.*) $2 last;<br> rewrite ^/.*$ /index.php last;
<br> }<br><br>which worked too but i didnt managed to reply to list to tell you as i was testing more stuff on it..<br>As i was testing with ab2 -n 1000 -c 100 <a href="http://sub.domain.tld/blog1/files/2007/02/40kb.jpg">
http://sub.domain.tld/blog1/files/2007/02/40kb.jpg</a> getting only ~230req/sec i noticed that php-cgi got hit everytime and i don't understand why it happens that when i access a static file which should be served directly after rewrite by nginx
<br>if i do ab2 -n 1000 -c 100 <a href="http://sub.domain.tld/wp-content/blogs.dir/4/files/2007/02/40kb.jpg">http://sub.domain.tld/wp-content/blogs.dir/4/files/2007/02/40kb.jpg</a> (which is the same file only without rewrite) i get ~400req/sec
<br><br>(should i start another "thread" with nginx and maybe some WP related questions or i can continue here?)<br><br>Thank you again for the great/fast help.<br><br><div><span class="gmail_quote">On 2/14/07,
<b class="gmail_sendername">Igor Sysoev</b> <<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, Feb 14, 2007 at 04:21:49PM +0300, Igor Sysoev wrote:<br>> On Wed, Feb 14, 2007 at 12:09:05PM +0200, Anonymous Coward wrote:<br>><br>> Let's start from the scratch:<br>><br>> 1) set the root at server level,
<br>> 2) and move all if/rewrite rules to server level, then they will run<br>> only once:<br>><br>> server {<br>> ...<br>><br>> root /var/www/localhost/htdocs/sub.domain.tld;
<br>><br>> #uploaded files<br>> rewrite ^(.*)?/?files/(.*) /wp-content/blogs.php?file=$2;<br><br>- rewrite ^(.*)?/?files/(.*) /wp-content/blogs.php?file=$2;<br>+ rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;
<br><br>><br>> if (!-e $request_filename) {<br>> rewrite ^.+?(/wp-.*) $2 last;<br>> rewrite ^.+?(/.*\.php)$ $2 last;<br><br>- rewrite ^.+?(/wp-.*) $2 last;
<br>- rewrite ^.+?(/.*\.php)$ $2 last;<br>+ rewrite ^.+?(/wp-.*) $1 last;<br>+ rewrite ^.+?(/.*\.php)$ $1 last;<br><br>> rewrite ^ /index.php last;
<br>> }<br>><br>> ...<br>> }<br>><br>><br>> The "^([_0-9a-zA-Z-]+)?(/wp-.*)" does not match "/test130/wp-content/...".<br>><br>><br>> > I tried that too, same result...
<br>> > I also looked in access.log and i noticed that i was getting 404 on these<br>> > files<br>> ><br>> > /test130/wp-content/themes/default/style.css<br>> > /test130/wp-content/themes/default/images/kubrickbg.jpg
<br>> ><br>> > On website i was trying to access sub.domain.tld/test130/ (which is a blog<br>> > in Wordpress Mu) and on the server the files were in<br>> ><br>> > $documentroot/wp-content/themes/home/images/kubrickbg.jpg
<br>> > $documentroot/wp-content/themes/default/images/kubrickbg.jpg<br>> ><br>> > $documentroot/wp-content/themes/home/style.css<br>> > $documentroot/wp-content/themes/default/style.css<br>> > $documentroot/wp-content/themes/classic/style.css
<br>> ><br>> > Maybe this will clear something...<br>> ><br>> > It's seems that "^([_0-9a-zA-Z-]+)?(/wp-.*)" are static files, so "break"<br>> > >stops rewrite cycle. The "last" continues rewrite cycle and request will
<br>> > >go to "location ~ .php$".<br>><br>><br>> --<br>> Igor Sysoev<br>> <a href="http://sysoev.ru/en/">http://sysoev.ru/en/</a><br>><br><br>--<br>Igor Sysoev<br><a href="http://sysoev.ru/en/">
http://sysoev.ru/en/</a><br><br></blockquote></div><br>