Report this

What is the reason for this report?

Need some help setting up wordpress multi-site Nginx

Posted on November 13, 2016

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.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.