wampserver多站點配置

2021-09-10 16:52:26 字數 1248 閱讀 5589

首先,d:\wampserver\wampserver\wamp64\bin\apache\apache2.4.23\conf\extra在該目錄下(也就是你的wampserver的安裝目錄)找到httpd-vhosts.conf開啟

配置時,我們可以直接複製他注釋裡面的模板

servername localhost

documentroot d:/wampserver/wampserver/wamp64/www

複製後只保留servername 和documentroot

servername就是你在瀏覽器位址列輸入的訪問的網域名稱(對於我們**目錄裡的資料夾)

documentroot 即是我們自己的**路徑

例:servername test01.com

documentroot e:/phpdemo/test01

第二步:由於httpd-vhosts.conf是擴充套件檔案,要確保httpd-vhosts.conf的配置的被引用的,(有些版本預設是被注釋掉的.)

開啟httpd.conf檔案d:\wampserver\wampserver\wamp64\bin\apache\apache2.4.23\conf

查詢include conf/extra/httpd-vhosts.conf,去掉前面的#號

第三步:修改系統主機站點,開啟c:\windows\system32\drivers\etc\hosts檔案,hotst裡面的網域名稱要與第一步配置檔案裡面相對應!

第四步:在自己的**路徑下新建對於的專案(與第一步的documentroot 中對應!)

最後,在test01裡面新建index.php(不能命名成其他名字),在裡面寫自己的**

最後,重啟wampserver,在瀏覽器輸入test01.com

WAMPServer多站點配置

1.首先修改wampserver安裝目錄下的d study wampserver wamp bin apache apache2.2.21 conf extra httpd vhosts.conf檔案,如下 更改對應的位址,testone,testtwo分別代表工程的根目錄,儲存 3.在php工程的...

wampserver配置多站點

1.在 httpd.conf 檔案中查詢 include conf extra httpd vhosts.conf,去掉前面的注釋 開啟extra httpd vhosts.conf檔案 在最後加入類似內容 檔案路徑是自己安裝程式的路徑 documentroot d wamp www aaa 這是你...

wampServer多站點配置

1.新增站點 在apache conf extra httpd vhosts.conf 中加入站點 documentroot d demo test01 servername test01.com documentroot d demo test02 servername test02.com 2....