輸入localhost之后,顯示的是test01的輸出語句,輸入test02也是顯示test01的語句
按照評論的解決方法,已經(jīng)修改了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>
是出現(xiàn)了哪里的問題?
2017-02-16
請問你是怎么解決的 我們是一樣的問題
2016-12-04
你開啟了httpd-vhosts.conf嗎??
2016-12-04
也就是? localhost:8080?
2016-12-04
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>