Question

Need some help setting up wordpress multi-site Nginx

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.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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