1. 程式人生 > >【PHP編程之路

【PHP編程之路

== 編程 one water sts bsp mar watermark logs

概述

設置apache虛擬目錄

1.開啟“虛擬目錄配置文件”httpd-vhosts.conf

文件路徑:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

將以下配置:

  1. # Virtual hosts
  2. # Include conf/extra/httpd-vhosts.conf

改為:

  1. # Virtual hosts
  2. Include conf/extra/httpd-vhosts.conf

2.設置虛擬目錄可訪問

文件路徑:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

將以下配置:

  1. <Directory />
  2. AllowOverride none
  3. Require all denied
  4. </Directory>

改為:

  1. <Directory />
  2. AllowOverride none
  3. </Directory>

3.添加虛擬目錄

文件路徑:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

添加虛擬目錄

  1. <VirtualHost *:80>
  2. ServerAdmin [email protected]
/* */
  • DocumentRoot "D:/_HelloWorld/01_MyProjects/06_PHP/01_Web/Product/Source/Shop"
  • ServerName web.shop.com
  • ErrorLog "logs/web.shop.com-error.log"
  • CustomLog "logs/web.shop.com-access.log" common
  • </VirtualHost>

  • 4.重啟apache

    5.在瀏覽器中輸入web.shop.com

    技術分享

    【PHP編程之路