1. 修改 httpd.conf,新增 Listen
    在原本 Listen 80 後加上想要使用的 Port
    Listen 8012

2. 修改 httpd-vhosts.conf,加上想要的站
    <VirtualHost *:8012>
        DocumentRoot "D:\www\www_8012"
        ServerName localhost:8012
       <Directory "D:\www\www_8012">
        AllowOverride All
        Require all granted
      </Directory>
    </VirtualHost>

3. 重新啟動 apache

4. 輸入 http://localhost:8012 測試看看
   
註1:以上範例是以 Xampp 3.2.1 為準
註2:其實是因為公司內部控管比較嚴,沒有辦法修改 hosts 的關係

arrow
arrow
    全站熱搜

    wbkuo 發表在 痞客邦 留言(1) 人氣()