Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 :

  1. /var/www/wikifamly for mediawiki
  2. /var/www/blogs for wordpress

I want to use it like this :

  1. mydomain.com or mydomain.com/blog for blog

  2. 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 .

share|improve this question
    
What subdomain will you use for the wiki? You did not say. –  Michael Hampton Feb 23 '13 at 18:49
    
there is no subdomains as i say mydomain.com/wiki for the mediawiki –  eyadof Feb 23 '13 at 19:08
    
You can't do that if you're going to do a wiki family. –  Michael Hampton Feb 23 '13 at 19:09
    
i have multi domain i can't use subdomain for each wiki –  eyadof Feb 23 '13 at 19:14
    
Then you aren't making a wiki family. –  Michael Hampton Feb 23 '13 at 19:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.