Nginx-- Web Hosting

Examples to compare a variety of ways

 

 

Based IP  - the one physical server into multiple virtual servers, each virtual host has a separate domain name and directory, the disadvantage of requiring multiple IP,

Add a child card

 

Added successfully

 

Configuring the host domain name

Create a root directory

 

View card information, add success!

 

Port-based   - only one i the p-, for internal use, the disadvantage port can not tell the public network users

 IP-based configuration change little, the same IP, different ports,

 

Also can access

 

Based domain name  - access to IP with a different domain name. To sum up the most reasonable way

  vi / etc / hosts - configure the domain name

 

 

 

 

 

 So the next lowest configuration condition resources, the most reasonable way is to release two URL domain name based on the way

 

Guess you like

Origin www.cnblogs.com/sunny666/p/11058001.html