云計(jì)算
本篇內(nèi)容介紹了“Appach服務(wù)器怎么讓IP綁定多個(gè)域名”的有關(guān)知識(shí),在實(shí)際案例的操作過程中,不少人都會(huì)遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
1.開發(fā)好自己的網(wǎng)站放到D盤下
例如: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.在瀏覽器中輸入:域名 即可訪問D盤下的new.html文件了。
“Appach服務(wù)器怎么讓IP綁定多個(gè)域名”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!