Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 3168  / 2 Years ago, sun, december 19, 2021, 4:56:42

I'm using VirtualBox on my Windows 8.1 pc to host a Ubuntu Server 14.04 guest that runs Apache as a development web server.



I'm using Bridged Adapter in VirtualBox.



I have a few vhost on Apache and I can access all of them using Firefox or IE from the host. But I can't access it using Chrome.



Chrome gives me the following:



ERR_CONNECTION_REFUSED

Google Chrome's connection attempt to cooksfromhome.localhost was
rejected. The website may be down, or your network may not be
properly configured.

[...]


From what I understand, my Apache config should be okay because I can access it without problem with Firefox and IE... It looks as if Chrome can access my VirtualBox, but Apache refuses the connection... Any idea why I have this problem and what can I do to fix it?



Thanks!


More From » virtualbox

 Answers
6

I finally found the solution.



Chrome ignores all entries in the host file that tries to send any website with .localhost to an IP that is not the computer's local address.
(https://code.google.com/p/chromium/issues/detail?id=489973)



So I modified my Apache vhost in my Ubuntu VirtualBox from



ServerName mysite.localhost


to



ServerName mysite.local.host


(And I modified my host file accordingly) And now it's working!



Note that the ServerName could be whatever you want, as long as it doesn't end with .localhost.


[#18778] Sunday, December 19, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leddre

Total Points: 180
Total Questions: 113
Total Answers: 108

Location: France
Member since Thu, Oct 27, 2022
2 Years ago
;