简体   繁体   English

Windows Virtualhost上的Apache:可在IE或Edge上使用,但无法在Chrome和Firefox上连接

[英]Apache on Windows Virtualhost: works on IE or Edge, but unable to connect on Chrome and Firefox

I never had problems with multiple Virtualhosts on Apache, not on Windows nor BSD. 我从未在Apache而不是Windows或BSD上使用多个Virtualhosts遇到问题。

My secondary virtualhost gives me ERR_CONNECTION_REFUSED in Chrome. 我的辅助虚拟主机在Chrome中给了我ERR_CONNECTION_REFUSED。 "httpd -S" gives me no errors and a good config, this got me thinking, so I tried "curl -v", which was successful, then I tried IE and EDGE and they are working fine. “ httpd -S”没有给我任何错误,并且配置良好,这让我开始思考,因此我尝试了“ curl -v”,该方法很成功,然后尝试了IE和EDGE,并且它们工作正常。

I tried to empty Chrome DNS cache, there are no Apache logs for the connections made from Chrome or FF, but there are log entries from 'localhost' and that's accessible from all and produces the logs from all browsers. 我试图清空Chrome DNS缓存,没有从Chrome或FF建立的连接的Apache日志,但是有来自“ localhost”的日志条目,并且所有人均可访问,并从所有浏览器生成日志。

I'm kind of curious now, what is this? 我现在很好奇,这是什么?

Okay, I forgot to mention: I used .dev for tld on my virtualhost, and I won't do it anymore. 好的,我忘了提一下:我在虚拟主机上将.dev用于tld,现在不再使用了。 Here is why: 原因如下:

Chrome 63 (out since December 2017), will force all domains ending on .dev (and .foo) to be redirected to HTTPS via a preloaded HTTP Strict Transport Security (HSTS) header. Chrome 63(自2017年12月开始发布)将强制所有以.dev(和.foo)结尾的域通过预加载的HTTP Strict Transport Security(HSTS)标头重定向到HTTPS。

Update 07/02/2018: Firefox now also forces .DEV domains to HTTPS. 更新2018年7月2日:Firefox现在也将.DEV域强制为HTTPS。

https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/ https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

Conclusion: If you configure your .dev domain for ssl then there is no way to make an exception (firefox or chrome). 结论:如果为ssl配置.dev域,则无法进行例外处理(firefox或chrome)。 So no more dev domains for local development, for me at least. 因此,至少对我而言,没有更多的开发领域可用于本地开发。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么特定网站上的HTTP / 2在FF中工作,但在同一台Windows 10计算机上的Chrome,IE和Edge中不起作用? - Why HTTP/2 on a specific site works in FF, but doesn't work in Chrome, IE and Edge on the same Windows 10 computer? 在 Windows 上设置 Apache 虚拟主机 - Set up Apache virtualhost on Windows Windows - VirtualHost 中的 Apache DocumentRoot 被忽略 - Windows - Apache DocumentRoot in VirtualHost ignored Apache 虚拟主机在 windows 服务器上存在子域问题 - Apache virtualhost with subdomain issue on windows server 代码适用于Firefox,但不适用于IE - Code works on firefox but not IE 修改Apache配置文件后无法连接到本地主机(Windows) - Unable to connect to local host after modifying Apache config file (Windows) 127.0.0.1 适用于 Chrome 但不适用于 Edge - 127.0.0.1 works in Chrome but doesn't work in Edge windows 10 中 Chrome/Edge 浏览器的单一实例 - Single Instance of Chrome/Edge Browser in windows 10 带有Canvas的HTML5 / JavaScript文件无法在Windows 8上与Chrome和Firefox一起使用,但适用于Windows 7上的所有浏览器。为什么? - HTML5/JavaScript File with Canvas doesn't work with Chrome&Firefox on windows 8 but works with all browsers on windows 7. why? 无法远程连接到Subversion边缘服务器 - Unable to connect to a subversion edge server remotely
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM