官术网_书友最值得收藏!

  • NGINX Cookbook
  • Tim Butler
  • 69字
  • 2021-07-03 00:04:23

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.

主站蜘蛛池模板: 额敏县| 金沙县| 平湖市| 石棉县| 金阳县| 大邑县| 鹤壁市| 安吉县| 西和县| 金坛市| 尖扎县| 南乐县| 五寨县| 苍溪县| 诸暨市| 安宁市| 朝阳市| 昌吉市| 寻乌县| 宜章县| 宜兰县| 扶沟县| 商城县| 沙坪坝区| 洮南市| 嘉祥县| 汨罗市| 西城区| 常熟市| 磐石市| 晋江市| 贵定县| 塔城市| 平塘县| 报价| 灵石县| 汾阳市| 积石山| 枣强县| 泾川县| 白水县|