Nginx rewrite for wordpress MU problem

Endra Pradipta lists at ruby-forum.com
Thu Mar 5 17:58:34 MSK 2009


Hi all,

Just wondering, I'm trying to setup Wordpress MU with nginx. Have search 
both wordpress, google and this forum for solution, but unable to find.

I'm having problem showing the post using permalink, it gives 404 error.

I installed Wordpress MU on a sub-folder on 
/nginx/html/domain.com/blogs.

- Pages are working just fine
- Site Admin works fine

My nginx.conf is as follows:

server {
   listen       80;
   server_name  domain.com *.domain.com;

   root /nginx/html/domain.com;
   index index.php index.html index.htm;

   rewrite ^.*/files/(.*) /wp-content/blogs.php?file=$1;
   if (!-e $request_filename) {
      rewrite ^.+?(/wp-.*) $1 last;
      rewrite ^.+?(/.*\.php)$ $1 last;
      rewrite ^ /index.php last;
   }

   location ~ \.php$ {
      fastcgi_pass 127.0.0.1:9000;
      fastcgi_index index.php;
      fastcgi_param 
SCRIPT_FILENAME/nginx/html/domain.com$fastcgi_script_name;
      include fastcgi_params;
   }
}

Can anyone tell me what I missed? Thank you in advance.
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list