Apache 设置多个虚拟服务器

#Listen 12.34.56.78:80
Listen 8888
Listen 127.0.0.1:8082

DocumentRoot "D:/Php/test1"


<VirtualHost 127.0.0.1:8082>
  ServerAdmin webmaster@host.example.com
#  DocumentRoot "D:/Php/test1"
DocumentRoot "D:/Php/test2"
  ServerName host.example.com
  ErrorLog logs/host.example.com-error_log
  TransferLog logs/host.example.com-access_log
   <Directory />
      Options FollowSymLinks
   AllowOverride None
      Order allow,deny
      Allow from all
 </Directory>
</VirtualHost>

如此

:8888 ==》 "D:/Php/test1"

:8082 ==》 "D:/Php/test2"

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzxyzd.html