例如:D:/new.html
2.打開appcah服務器的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)找到虛擬機配置
# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf
# Virtual hosts啟用虛擬主機配置
Include conf/extra/httpd-vhosts.conf
3.打開httpd-vhosts.conf文件(位置在conf/extra/httpd-vhosts.conf)
#你的項目位置
DocumentRoot \”D:/\”
#你想取的域名(注意這里會和下面的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服務器怎么讓IP綁定多個域名”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識可以關注三五互聯網站,小編將為大家輸出更多高質量的實用文章!
更多關于云服務器,域名注冊,虛擬主機的問題,請訪問三五互聯官網:m.shinetop.cn