WordPress multisite

I have nginx running on a local intranet server.
I’m trying to setup WordPress multisite with subdirectory, and WP is
located in $document_root/wordpress because there are many other folders
directly under the document_root path.

  • I want to access the WP site as http://serv_IP/wp/, but alias does not
    work - I must specify http://serv_IP/wordpress/ each time.
    location /wp/ {
    alias /document_root/wordpress/;
    try_files $uri $uri/ /index.php?$args;
    include /usr/local/etc/nginx/wordpress.conf;
    fastcgi_pass unix:/var/run/www/php-fpm.sock; }

nginx-error.log shows: FastCGI sent in stderr: “Primary script unknown”
while reading response header from upstream, client:,
my.org, request: “GET /wp/ HTTP/1.1”, upstream:
“fastcgi://unix:/var/run/www/php-fpm.sock:”, host: “”,
referrer: “

If I replace in above code “alias” with “root”, I just get the
php-information page.

  • I’d like to keep nginx.conf clean and pass wordpress.conf using the
    include method. How must I modify the code provided in
    http://wiki.nginx.org/WordPress, so that the multisite traffic is
    to the $document_root/wordpress/ folder, and not “/”?

If I pull the try_files code to nginx.conf, startup advises:
nginx: [emerg] “map” directive is not allowed here in
Where should the “map $uri $blogname / map $blogname $blogid” code be