多站點配置:
1.在httpd.conf中開啟多站點配置:
2.開啟檔案(httpd-vhosts.conf),設定要進行多站點配置的ip和配置,形式如下:
namevirtualhost ip:埠
*可以代表當前伺服器的所有ip位址(通常也就乙個)
在檔案中預設設定好了
3.往後記一次乙個乙個站點設定就可以了,如下:
(注意:一旦進行了多站點配置,則原來httpd.conf中的預設站點配置就失效了)
#站點1
#下面「*:80」要跟前面namevirtualhost的設定一樣
servername www.dancheng1.con
serveralias dancheng1.com
documentroot "d:\work\word"
options indexes
allowoverride all
order allow,deny
allow from all
deny from 192.168.3.33
directoryindex index.php
#站點2
servername www.dancheng.con
documentroot "d:\work\apache"
options indexes
order allow,deny
allow from all
Apache多站點配置
使用本地ip 埠號,或者修改hosts檔案 網域名稱的方法來進行本地多站點web除錯。127.0.0.1 www.def.com 上邊是使用網域名稱的方法。下邊說下如何使用本地ip 埠的方法。例如本機ip為 192.168.0.10 那如何控制 80 1000 1001 1002 來訪問不同的檔案目...
apache多站點配置
首先開啟apache安裝目錄下 conf httpd.conf 檔案,找到下面兩行文字,把最前面的 號去掉,然後儲存。再找到 conf extra httpd vhosts.conf,虛擬主機配置檔案 serveradmin webmaster dummy host.example.com docu...
Apache多站點配置
完成整個站點配置需要設定三個檔案 d documents web ft cc 此處對應站點檔案的位址 possible values for the options directive are none all or any combination of indexes includes follo...