例如:D:/new.html
2.打開appcah服務(wù)器的httpd.conf文件
例如我的文件保存在:D:\\\\EmpireServer\\\\php\\\\apache2.2\\\\conf中
(1)找到DocumentRoot
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#注銷掉DocumentRoot
#DocumentRoot \”D:/EmpireServer/web\”
#
# Each directory to which Apache has access can be configured with respect
(2)找到虛擬機(jī)配置
# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf
# Virtual hosts啟用虛擬主機(jī)配置
Include conf/extra/httpd-vhosts.conf
3.打開httpd-vhosts.conf文件(位置在conf/extra/httpd-vhosts.conf)
#你的項(xiàng)目位置
DocumentRoot \”D:/\”
#你想取的域名(注意這里會(huì)和下面的hosts文件中名字相同)
ServerName www.myself.com
#你的在瀏覽器中輸入域名首先要打開的文件
DirectoryIndex new.html
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
4.配置hosts文件(文件位置:C:\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\)
文件最后加上 :127.0.0.1 域名
5.在瀏覽器中輸入:域名 即可訪問(wèn)D盤下的new.html文件了。
“Appach服務(wù)器怎么讓IP綁定多個(gè)域名”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注西部數(shù)碼網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!
更多關(guān)于云服務(wù)器,域名注冊(cè),虛擬主機(jī)的問(wèn)題,請(qǐng)?jiān)L問(wèn)西部數(shù)碼官網(wǎng):www.ps-sw.cn