WAMPServer多站點配置

2021-06-27 03:18:57 字數 650 閱讀 8965

1.首先修改wampserver安裝目錄下的d:\study\wampserver\wamp\bin\apache\apache2.2.21\conf\extra\httpd-vhosts.conf檔案,如下:

更改對應的位址,testone,testtwo分別代表工程的根目錄,儲存

3.在php工程的根目錄(phpdemo)下,新建testone,testtwo兩個目錄,並且分別新增如下**:

<?php 

echo "hello testone";

?>

<?php 

echo "hello testtwo";

?>

4.開啟windows下的host檔案,c:\windows\system32\drivers\etc\hosts,在該檔案最後新增如下幾行:

127.0.0.1 localhost

127.0.0.1 testone.com

127.0.0.1 testtwo.com

5.測試,在瀏覽器中分別輸入

測試

wampserver多站點配置

首先,d wampserver wampserver wamp64 bin apache apache2.4.23 conf extra在該目錄下 也就是你的wampserver的安裝目錄 找到httpd vhosts.conf開啟 配置時,我們可以直接複製他注釋裡面的模板 servername l...

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....