1. 程式人生 > >Windows下Apache 多站點配置

Windows下Apache 多站點配置

修改httpd-vhosts.conf配置檔案

<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
     Require all granted 
  </Directory>
</VirtualHost>

在下方新增站點資訊



<VirtualHost *:80>
 DocumentRoot "${INSTALL_DIR}/www/duo/"
 ServerName www.duo.com
  <Directory "${INSTALL_DIR}/www/duo">
      Options +Indexes +Includes +FollowSymLinks +MultiViews
       AllowOverride All
     Require all granted 
     </Directory>
</VirtualHost>

修改:ServerName 為域名 DocumentRoot 與Directory 為專案位置