- 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.
推薦閱讀
- OpenDaylight Cookbook
- JavaScript修煉之道
- Learning Apex Programming
- Apache Spark Graph Processing
- PHP 7+MySQL 8動態網站開發從入門到精通(視頻教學版)
- Python Web數據分析可視化:基于Django框架的開發實戰
- C語言程序設計教程
- Python Data Analysis Cookbook
- 微信小程序全棧開發技術與實戰(微課版)
- 愛上micro:bit
- 計算機應用基礎教程(Windows 7+Office 2010)
- Creating Data Stories with Tableau Public
- Mastering OAuth 2.0
- After Effects CC案例設計與經典插件(視頻教學版)
- Building a Media Center with Raspberry Pi