apache虛擬主機配置

2021-09-24 14:39:49 字數 741 閱讀 9678

配置httpd.conf檔案,找到這三個**

去掉這三個的#

配置vhosts.conf檔案

在apache檔案目錄下,找到並開啟vhosts.conf檔案

複製修改以下**:

documentroot "d:\phpstudy\phptutorial\www" #專案所在檔案目錄

servername www.***xx.com #設定本地訪問**

serveralias ***x.com  #第二網域名稱

#此處檔案位置需要與上面路徑保持一致

options indexes followsymlinks execcgi

allowoverride all #允許分布式配置檔案對主配置檔案進行重寫

order deny,allow

allow from all #允許所有人訪問  

directoryindex index.html,index.htm,index.php #指定預設的主頁,如果不指定繼承全域性的

options indexes #允許展示列表

require all granted

apache虛擬主機配置

之前已經在csdn上上傳過apache的文件在這裡補充說明一下,apache2.2.x與tomcat或iis或三者之間的虛擬主機配置。介紹一下如何整合其他 web伺服器,如 iis tomcat 等。網上有 n多整合方案講的都不是很清楚 特別是 windows 下的 這裡要特別提示一下,apache...

apache虛擬主機配置

多個網域名稱 伺服器 對應乙個 ip 位址,配置方法為 namevirtualhost 111.22.33.44 servername www.sample.com documentroot www sample servername www.sample2.com documentroot www...

apache配置虛擬主機

namevirtualhost 80 directoryindex default.php index.html index.php index.htm servername www.host1.com servername host1 com documentroot d wamp www1 er...