Skip to content

Instantly share code, notes, and snippets.

@nkmail
nkmail / gist:e773eb06cad252029ff91957b4dd4cbe
Last active Oct 25, 2017 — forked from centminmod/gist:9034414
Wordpress Multi Site Nginx configuration template for CentminMod.com Nginx - based on Peter Downy community member
View gist:e773eb06cad252029ff91957b4dd4cbe
map $uri $blogname{
~^(?<blogpath>/[^/]+/)sites/(.*) $blogpath ;
}
map $blogname $blogid{
default -999;
include /home/nginx/domains/domain1.com/public/wp-content/uploads/nginx-helper/map.conf ;
}
server {
server_name domain1.com www.domain1.com domain2.com www.domain2.com domain3.com www.domain3.com ;