Preface
Many online tutorials are for configuring multi-site locally. Let me post a tutorial on configuring multi-site on the server and configuring domain name resolution .
Suppose our main domain name is tuziang.com and its directory is C:\phpStudy\PHPTutorial\WWW
. Now we need to make another website, test.tuziang.com, whose directory is C:\phpStudy\PHPTutorial\WWW\test
.
phpstudy
1. Open phpStudy, the "other options" where point click "Site Domain Settings'
2. See the following interface
Fill in the website domain name (test.tuziang.com), fill in www.test.tuziang.com as the second domain name, then select the website directory C:\phpStudy\PHPTutorial\WWW\test
, then click [Add] , then click [Save settings and generate configuration files]
3. Then phpstudy will Automatically restart apache
The phpstudy on the server has been configured. Next, configure the domain name.
DNS
I use the Tencent Cloud domain name, so let's take a look at Tencent Cloud's second-level domain name resolution .
2. Open the red box in the figure below
3. Click Add Record
and then pay attention to whether the content in the red box is filled in incorrectly, because this will affect the success or failure of the entire second-level domain name resolution. Fill in the
record value with your server IP, which is the same as the value of the main domain name tuziang.com
success
Well, everything is configured, and it will take effect after the domain name is resolved successfully.