服务器数据库系列 - Nginx 虚拟机设置

  • 配置:

http {

 server {

 listen          80;

 server_name     www.domain1.com;

 access_log      logs/domain1.access.log main;

 location / {

 index index.html;

 root  /var/www/domain1.com/htdocs;

 }

 }

 server {

 listen          80;

 server_name     www.domain2.com;

 access_log      logs/domain2.access.log main;

 location / {

 index index.html;

 root  /var/www/domain2.com/htdocs;

 }

 }

}

  • 说明
  1. 只要在模块里面新增模块
  2. 具体的根据您的实际需求去配置

你可能感兴趣的:(虚拟机,nginx,server,Access)