I have a few virtualhosts on my localhost apache, here's the config of one (the others just change the letters before .localhost)

<VirtualHost *:80>
    ServerAdmin admin@dev.localhost
    ServerName dev.localhost
    ServerAlias dev.localhost
    DocumentRoot /var/www/dev
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

It doesn't work on Chrome. Works on other browsers and works when I type this on terminal

sudo wget dev.localhost

When I access the virtualhost on Chrome, I get the error ERR_NAME_NOT_RESOLVED and if I'm not connected to the internet, I get ERR_INTERNET_DISCONNECTED (I think that's not supposed to happen once it's localhost)

I also tried to access the virtualhost with Chrome Private Mode (CTRL+SHIFT+N) and accessing like this I get the DNS_PROBE_FINISHED_NXDOMAIN error.

Tried to disable all my extensions too.

Everything I just said, it's only for virtualhosts because when I access localhost or any folder inside that, works fine.

This is my /etc/hosts file   localhost   Henrique-Note   bobbabr.localhost   art.localhost   id.localhost   artweb.localhost   pontoagua.localhost   ibobba.localhost   fnxhenry.localhost   pipoca.localhost   popbr.localhost   gentil.localhost   structure.localhost   thehits.localhost   dev.localhost

# The following lines are desirable for IPv6 capable hosts
::1             localhost
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

How can I fix this and access virtualhost on Chrome?

Chrome version: 43.0.2357.18 beta (64-bit)

OS: Elementary OS Freya, which is based on Ubuntu 14.04


closed as off-topic by EEAA, Jenny D, Hyppy, mdpc, MadHatter Apr 25 '15 at 7:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – EEAA, Jenny D, Hyppy, mdpc, MadHatter
If this question can be reworded to fit the rules in the help center, please edit the question.


Do you have a non-beta Chrome version you could try just in case it's a bug with Chrome?

Another thing you could try is to code those hostnames and configure the VirtualHosts to access the IP address of your machine instead of, even though in theory using should be legitimate.

  • 1
    I installed Chrome stable and it's working now. But why virtualhosts can't be accessed on this beta? I tried to search Chromium for something like that but found nothing. – Henrique Arthur Apr 20 '15 at 17:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.