Site: Similar WWW site root, as more sites will have multiple root directory, for example, I want to create a folder E: \ php \ project \ site01 to represent the root directory of a site, and then create a folder E : \ php \ project \ site02 to represent the root directory of the two sites, ...
Domain Name: localhost similar to the same, but localhost is a special local domain name, then www.abc.com or xxx.xxx.xxx.xxx top-level domains and subdomains etc.
Port: is a number, different numbers indicate the listening service is not the same for the computer connected to the inter network, will have a ip address, ip address start under normal circumstances this period is fixed in the computer, but also on behalf of Internet in a computer can be transferred to another computer stuff, use ip to bind uniqueness. So our computer may have a lot of service, different services need to be differentiated, then I can use port numbers to distinguish between arranged, port before the 1000 general local systems are commonly used service port. So we custom port, try to make the numbers bigger, biggest fine not more than 10,000.
。。。。。。。。。。。。。。。。。
So phpStudy how to define a multi-site, multi-domain, multi-port it?
。。。。。。。。。。。。。。。。。
First, I determine what we need domain name? such as
www.site01.com
www.site02.com
www.site03.com
Then the three domain names, I hope it is usually three sites, there will still be three different root directory, right. Then we create a corresponding root directory
E:\php\project\site01
E:\php\project\site02
E:\php\project\site03
Here, we want to www.site01.com this domain name corresponding to E: \ php \ php program under the project \ site01 root directory? ? ?
OK, first of all we need to click the Other Options menu phpStudy -> site domain name management, will appear as shown below
Before we set up in accordance with the preset good domain name and directory
Then save the settings and generate configuration files, other sites empathy.
Annex: https://www.jb51.net/article/122663.htm
phpStudy configure multi-site multi-domain and multi-port method
This article describes how to configure phpStudy multi-site multi-domain and multi-port, for everyone to share, but also give yourself a note
There are three projects under the WWW directory directory: a b c
Apache httpd The default port is 80, website directory is D: \ WWW \ a
1. Configure multi-domain multi-site
The first step: click on "Other Options menu" => Site domain management => set the following three Name:
(1) domain: a.com site directory: D: \ WWW \ a Web site port: 80
(2) domain: b.com site directory: D: \ WWW \ b Web site port: 80
(3) in this domain: c.com site directory: D: \ WWW \ c Web site port: 80
Save the configuration and generate a configuration file;
Step two: Open hosts.txt file, at the end of file add the following:
127.0.0.1 localmall.com
127.0.0.1 ynb.com
127.0.0.1 admintest.com
Restart apache, so multi-domain multi-site configuration on Ok, the port has not changed all 80
2. Configure multi-port
The first step in setting to:
(1) domain: a.com site directory: D: \ WWW \ a Web site port: 80
(2) domain: b.com site directory: D: \ WWW \ b Web site port: 81
(3) in this domain: c.com site directory: D: \ WWW \ c Web site port: 82
The second step above
The third step: open the configuration file httpd.conf, find the listening port location Listen 80, and an increase in its content under:
Listen 81
Listen 82
Restart the server, open vhosts.conf configuration file to see if there are the following:
<VirtualHost *:80> DocumentRoot "D:\WWW\a" ServerName a.com ServerAlias phpStudy.NET <Directory "D:\WWW\a"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost> <VirtualHost *:81> DocumentRoot "D:\WWW\b" ServerName b.com ServerAlias <Directory "D:\WWW\b"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost> <VirtualHost *:82> DocumentRoot "D:\WWW\c" ServerName c.com ServerAlias <Directory "D:\WWW\c"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>
If present, the configuration was successful.