C4f1151075b447779af31e99d6cf70e2c6eb47ac
By:
newbie

Need some help setting up wordpress multi-site Nginx

November 13, 2016 93 views
WordPress Nginx Ubuntu 16.04

Hi,
i have setup wordpress multi-site following this tutorial
https://www.digitalocean.com/community/tutorials/how-to-set-up-wordpress-multisite-with-nginx-on-ubuntu-14-04

i installed it on sub-directory by adding the following code.

    if (!-e $request_filename) {
        rewrite /wp-admin$ $scheme://$host$uri/ permanent;  
        rewrite ^(/[^/]+)?(/wp-.*) $2 last;                     
        rewrite ^(/[^/]+)?(/.*\.php) $2 last;                   
    }

everything working perfectly but when i try to change tagline or permalink of my site 2 & 3 it dont allow me.

secondly, wordpress network menu is visible to all the sites admin panel. even for 2nd & 3rd site. is there any way to disable network menu for the 3rd site? so that from that sites wp-admin only can manage that sites settings and not see entire network.

lastly, from the main site, example.com/wp-admin i cant find domain menu under tools but from 2nd & 3rd site i can find them. is it normal?

another thing i must add, i cant add following marked code in location ~ .php$

location ~ \.php$ {
        try_files $uri =404;
        include fastcgi_params;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
    }

it gives me sytax error saying try files duplicate. is it because i have this code in virtual host?

 location / {
        try_files $uri $uri/ /index.php?$args;
    }

thanks in advance.

1 comment
  • im really sorry, it was my mistake that i was loged in to other sites with super admin user. now i added another user but waiting for the confirmation email. do i need to configure mail server to get email for that? or wordpress build in email system will send that email?

    also could someone reply me for the try files issue?

    thanks in advance

1 Answer

Glad you got the first issue sorted out. WordPress will look for a local sendmail binary to use for sending outgoing messages via PHP mail(). You can install the postfix version of this service with:

sudo apt-get update;
sudo apt-get install postfix
Have another answer? Share your knowledge.