84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
For example: a.example.com/index.html corresponds to /a-direcoty/index.html, while b.example.com/index.html Corresponds to /b-direcoty/index.html
a.example.com/index.html
/a-direcoty/index.html
b.example.com/index.html
/b-direcoty/index.html
人生最曼妙的风景,竟是内心的淡定与从容!
server { listen 80; server_name ~^(?<subdomain>.+).example.com$; index index.html index.htm; root /$subdomain-direcoty/; }
nginx configuration file can set the server segment, and set server_name in the server to specify the domain name. So in this case, set up two servers, one with two domain names, and then set root as a specific directory
nginx configuration file can set the server segment, and set server_name in the server to specify the domain name. So in this case, set up two servers, one with two domain names, and then set root as a specific directory