VirtualHost 在 Microsoft Edge 中不起作用

Sky*_*yyy 4 virtual-host microsoft-edge

我正在使用虚拟主机并且它在所有浏览器中都可以正常工作,我可以从所有浏览器访问它,但在 Windows 10 Microsoft Edge 中它不起作用。它只打开本地主机,而不是我定义的任何其他虚拟主机

我的 Windows 主机文件包含

#   127.0.0.1       localhost
#   ::1             localhost

127.0.0.1       developerquery
::1             developerquery

127.0.0.1       test
::1             test
Run Code Online (Sandbox Code Playgroud)

Appache VirutalHost.conf 包含

NameVirtualHost *:80



<VirtualHost *:80>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot "F:\Local server\htdocs\localhost"
    CustomLog logs/localhost.error.logs combined
    ErrorLog logs/localhost.error.log
</VirtualHost>    

<VirtualHost *:80>
    ServerName developerquery
    ServerAlias developerquery
    DocumentRoot "F:\Local server\htdocs\developerquery"
    CustomLog logs/developerquery.error.logs combined
    ErrorLog logs/developerquery.error.log
</VirtualHost>

<VirtualHost *:80>
    ServerName test
    ServerAlias test
    DocumentRoot "F:\Local server\htdocs\test"
    CustomLog logs/test.error.logs combined
    ErrorLog logs/test.error.log
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

小智 6

在这里找到了解决方案:https : //social.technet.microsoft.com/Forums/en-US/0face535-3c7a-4658-be34-6c376322ca34/microsoft-edge-cant-open-local-domains?forum=win10itpronetworking

基本上你需要:

  • 进入控制面板 > Internet 选项 > 安全 > 本地 Intranet > 站点
  • 未选中“包括未在其他区域中列出的所有本地(内联网)站点”和“包括绕过代理服务器的所有站点”
  • 单击“确定”并重新启动 Edge