设置WAMPserver后,我的Apache localhost网站在IE,Chrome和Firefox上正确加载。但是,在创建虚拟主机(在本例中为 bssb.dev )后,Chrome和Firefox无法检索页面(错误如下所示)。但是,IE成功加载。即使在创建虚拟主机之后,所有三个浏览器仍然可以成功加载localhost。
Chrome Error: This site can’t be reached. bssb.dev refused to connect
Firefox Error: Unable to connect. Firefox can’t establish a connection to the server at bssb.dev.
应注意,失败后重定向到https://bssb.dev
我已粘贴下面的Apache虚拟主机和系统HOSTS文件以供参考。任何指导都将非常感谢。
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#
<VirtualHost *:80>
ServerName bssb.dev
DocumentRoot "c:/users/ian/documents/mywebprojects/bssb"
<Directory "c:/users/ian/documents/mywebprojects/bssb/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#
<VirtualHost *:443>
ServerName bssb.dev
DocumentRoot "c:/users/ian/documents/mywebprojects/bssb"
<Directory "c:/users/ian/documents/mywebprojects/bssb/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#
127.0.0.1 localhost
::1 localhost
127.0.0.1 bssb.dev
::1 bssb.dev
OS: Windows 8.1 (unfortunately)
Firefox v60.0.2 (64-bit)
Chrome v66.0.3359.181 (Official Build) (64-bit)
IE v11.0.9600.19003
WAMPsever v3.1.3 (64-bit)
答案 0 :(得分:0)
没有显式端口号的HTTPS表示端口443.为端口443添加虚拟主机。