NGINX Cookbook
上QQ阅读APP看书,第一时间看更新

Subdomains

If you've selected subdomains, your code to put in wp-config.php will look like this:

define('MULTISITE', true); 
define('SUBDOMAIN_INSTALL', true); 
define('DOMAIN_CURRENT_SITE', 'wordpressdemo.nginxcookbook.com'); 
define('PATH_CURRENT_SITE', '/'); 
define('SITE_ID_CURRENT_SITE', 1); 
define('BLOG_ID_CURRENT_SITE', 1); 

You'll also need to modify the NGINX config as well to add in the wildcard for the server name:

server_name  *.wordpressdemo.nginxcookbook.com wordpressdemo.nginxcookbook.com; 

You can now add in the additional sites, such as site1.wordpressdemo.nginxcookbook.com, and there won't be any changes required for NGINX.