亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

輸入localhost之后,顯示的是test01的輸出語句,輸入test02也是顯示test01的語句

按照評論的解決方法,已經修改了locahost的端口為8080,其他test01,test01端口為80;localhost的虛擬站點配置代碼如下:<VirtualHost *:8080>
?? ?ServerName localhost
?? ?DocumentRoot D:/Demo
?? ?<Directory? "D:/Demo">
?? ??? ?Options +Indexes +Includes +FollowSymLinks +MultiViews
?? ??? ?AllowOverride All
?? ??? ?Require all granted
?? ?</Directory>
</VirtualHost>

test01:

<VirtualHost *:80>
?? ?ServerName test01
?? ?DocumentRoot D:/Demo/test01
?? ?<Directory? "D:/Demo/test01">
?? ??? ?Options +Indexes +Includes +FollowSymLinks +MultiViews
?? ??? ?AllowOverride All
?? ??? ?Require all granted
?? ?</Directory>
</VirtualHost>

test02:

<VirtualHost *:80>
?? ?ServerName test02
?? ?DocumentRoot D:/Demo/test02
?? ?<Directory? "D:/Demo/test02">
?? ??? ?Options +Indexes +Includes +FollowSymLinks +MultiViews
?? ??? ?AllowOverride All
?? ??? ?Require all granted
?? ?</Directory>
</VirtualHost>

是出現了哪里的問題?

正在回答

4 回答

請問你是怎么解決的 我們是一樣的問題


0 回復 有任何疑惑可以回復我~


你開啟了httpd-vhosts.conf嗎??


0 回復 有任何疑惑可以回復我~
#1

purple涵_23 提問者

開啟? 不是一直開著的嗎
2016-12-04 回復 有任何疑惑可以回復我~

也就是? localhost:8080?

0 回復 有任何疑惑可以回復我~

servername是服務器名,要帶域名全稱。


<VirtualHost *:8080>
?? ?ServerName localhost
?? ?DocumentRoot D:/Demo
?? ?<Directory? "D:/Demo">
?? ??? ?Options +Indexes +Includes +FollowSymLinks +MultiViews
?? ??? ?AllowOverride All
?? ??? ?Require all granted
?? ?</Directory>
</VirtualHost>

<VirtualHost *:80>
?? ?ServerName test01.com
?? ?DocumentRoot D:/Demo
?? ?<Directory? "D:/Demo">
?? ??? ?Options +Indexes +Includes +FollowSymLinks +MultiViews
?? ??? ?AllowOverride All
?? ??? ?Require all granted
?? ?</Directory>
</VirtualHost>

0 回復 有任何疑惑可以回復我~
#1

purple涵_23 提問者

也就是 localhost:8080?
2016-12-04 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

輸入localhost之后,顯示的是test01的輸出語句,輸入test02也是顯示test01的語句

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號