i want to use wordpress MU with mediawiki on the same domain , but i'm using a kind of mediawiki hosting service called wikifamily.
so i have to different script root :
- /var/www/wikifamly for mediawiki
- /var/www/blogs for wordpress
I want to use it like this :
mydomain.com or mydomain.com/blog for blog
mydomain.com/wiki for mediawiki
I tried to write some think like :
map $http_host $blogid {
default -999;
}
server {
server_name mydomain.com;
root /var/www/blogs/;
index index.php;
location /wiki {
index index.php index.html index.html;
root /var/www/wikifamly;
rewrite ^/?wiki/(.*)$ /index.php?title=$1 last;
rewrite ^/?wiki/*$ /index.php last;
rewrite ^/*$ /index.php last;
location ~* \.php {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_sc$
}
}
location / {
try_files $uri $uri/ /index.php?$args ;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}
#WPMU Files
location ~ ^/files/(.*)$ {
try_files /wp-content/blogs.dir/$blogid/$uri /wp-includes/ms-fi$
access_log off; log_not_found off; expires max;
}
#WPMU x-sendfile to avoid php readfile()
location ^~ /blogs.dir {
internal;
alias /var/www/blogs/htdocs/wp-content/blogs.dir;
access_log off; log_not_found off; expires max;
}
}
it's work great with wordpress but no sense with mediawiki
any help please and thanks in advance .