解析wamp5下虛擬機器設定文檔_PHP教程

來源:互聯網
上載者:User
Wamp下,虛擬機器設定分為三個步驟,執行個體如下:
1.修改Hosts檔案
C:\WINDOWS\system32\drivers\etc\Hosts
127.0.0.1 dz1.test.com

2.編輯wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf檔案,在檔案底部加入以下代碼

ServerName dz1.test.com
ServerAlias dz1.test.com
DocumentRoot "e:/wamp/www/dz1"

另外加上這句以後,如果沒有下面這句的記得加上,不然打localhost打不開最好再加上

ServerName localhost
ServerAlias localhost
DocumentRoot "D:/wamp/www"

3.編輯E:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf檔案,在檔案底部加入以下代碼
註:不加此代碼會報403錯誤
開啟設定檔httpd.conf,並去掉#Include 0conf/extra/httpd-vhosts.conf前面的#號!!

Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all

重啟Apache,然後測試dz1.test.com,就可以了。
。。。。。。。。。。。。。。。。
注意紅色加粗的部分,必須相同,且檔案存在

http://www.bkjia.com/PHPjc/327886.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327886.htmlTechArticleWamp下,虛擬機器設定分為三個步驟,執行個體如下: 1.修改Hosts檔案 C:\WINDOWS\system32\drivers\etc\Hosts 127.0.0.1 dz1.test.com 2.編輯wamp\bin\apache\Apache2.2.11\...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.