Apache多站點配置

2021-07-26 21:32:42 字數 2563 閱讀 8495

完成整個站點配置需要設定三個檔案:

"d:/documents/web_ft_cc">//此處對應站點檔案的位址

## possible values for the options directive are "none", "all",

# or any combination of:

# indexes includes followsymlinks symlinksifownermatch execcgi multiviews

## note that "multiviews" must be named *explicitly* --- "options all"

# doesn't give it to you.

## the options directive is both complicated and important. please see

# # for more information.

# options indexes followsymlinks includes execcgi

## allowoverride controls what directives may be placed in .htaccess files.

# it can be "all", "none", or any combination of the keywords:

# allowoverride fileinfo authconfig limit

# allowoverride all

## controls who can get stuff from this server.

#require all granted

"d:/documents/fuotuo_com">//第二個站點檔案的位址

## possible values for the options directive are "none", "all",

# or any combination of:

# indexes includes followsymlinks symlinksifownermatch execcgi multiviews

## note that "multiviews" must be named *explicitly* --- "options all"

# doesn't give it to you.

## the options directive is both complicated and important. please see

# # for more information.

# options indexes followsymlinks includes execcgi

## allowoverride controls what directives may be placed in .htaccess files.

# it can be "all", "none", or any combination of the keywords:

# allowoverride fileinfo authconfig limit

# allowoverride all

## controls who can get stuff from this server.

#require all granted

80>

serveradmin [email protected]

.com

documentroot "d:/documents/web_ft_cc"//對應站點檔案位置

servername www1.weft

.cc //站點名

errorlog "logs/www1.weft.cc-error.log"

customlog "logs/www1.weft.cc-access.log" common

80>

serveradmin [email protected]

.com

documentroot "d:/documents/fuotuo_com"//站點位置

servername www1.fuotuo

.com//站點名

errorlog "logs/www1.fuotuo.com-error.log"

customlog "logs/www1.fuotuo.com-access.log" common

3.在自己的檔案中的windows/system32/drivers/etc裡的hosts檔案:增加內容如下:

127.0

.0.1 www1.weft

.cc //站點一的訪問位址

127.0

.0.1 www1.fuotuo

.com //站點二的訪問位址

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多站點配置

多站點配置 1.在httpd.conf中開啟多站點配置 2.開啟檔案 httpd vhosts.conf 設定要進行多站點配置的ip和配置,形式如下 namevirtualhost ip 埠 可以代表當前伺服器的所有ip位址 通常也就乙個 在檔案中預設設定好了 3.往後記一次乙個乙個站點設定就可以了...