Nginx rewrite for wordpress MU problem
Edho P Arief
edhoprima at gmail.com
Fri Mar 6 05:40:27 MSK 2009
On Thu, Mar 5, 2009 at 9:58 PM, Endra Pradipta <lists at ruby-forum.com> wrote:
> 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/.
>
>
rewrite rule for the folder
location ^~ /blogs/ {
rewrite ^.*/files/(.*) /blogs/wp-content/blogs.php?file=$1;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) /blogs/$1 last;
rewrite ^.+?(/.*\.php)$ /blogs/$1 last;
rewrite ^ index.php last;
}
}
*this is just example.
*WP-MU is basically rewrite hell. I personally won't install it
together with another webapp that requires rewrites.
--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
More information about the nginx
mailing list