Apache服務器的配置

Apache服務器的配置

WampService集成環境的使用

配置本地IP資源

說明:在局域網環境中,不容許別人訪問本機的資源,默認狀況下Apache中不容許的,能夠經過修改相關的配置參數來讓本地資源均可以被訪問到 。node

修改步驟:git

  1. wamp\bin\apache\Apache2.4.4\conf目錄下找到httpd.conf文件
  2. 查找 deny 找到如下代碼

enter description here
3. 將 Deny from all 修改成 Allow from all

enter description here

修改項目訪問的目錄

說明:默認狀況下訪問的根目錄在安裝目錄下的 www文件夾下 apache

enter description here

修改步驟:服務器

  1. 在wamp\bin\apache\Apache2.4.4\conf目錄下找到httpd.conf文件code

  2. 查找 Documentroot找到如下代碼 ip

    enter description here

  3. 修改上面的兩處路徑爲你項目的所在位置的根路徑資源

配置虛擬主機

  1. 在wamp\bin\apache\Apache2.4.4\conf目錄下找到httpd.conf文件
  2. 查找 Virtual找到如下代碼

enter description here
3. 去掉第二行代碼前面的 # 並找到 conf\extra 目錄下面的 httpd-vhosts.conf文件
enter description here

  1. 配置本身的虛擬主機
    enter description here

配置ip地址與域名的對應關係

  1. C:\Windows\System32\drivers\etc路徑下找到文件 host

enter description here
2. 配置 ip地址與 域名的對應關係

enter description here
3. 配置完成以後,重啓Apache服務器,
相關文章
相關標籤/搜索