I have a problem that only takes place in Google Chrome and it is OK in Firefox and IE. I have googled a lot of websites and done a few tips but nothing worked.
I have WAMP Server installed. I have setup two virtual hosts:
The problem is that whenever I enter localhost in the addressbar, It immediately redirects to enginter.local ! And Chrome shows this error for all of local URLs:
This page isn’t working
enginter.local didn’t send any data.
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot "d:/wamp/www/real/yegane" ServerName yegane.local ServerAlias www.yegane.local ErrorLog "logs/yegane.local-error.log" CustomLog "logs/yegane.local-access.log" common <Directory "/"> Require all granted </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin firstname.lastname@example.org DocumentRoot "d:/wamp/www/real/enginter" ServerName enginter.local ServerAlias www.enginter.local ErrorLog "logs/enginter.local-error.log" CustomLog "logs/enginter.local-access.log" common <Directory "/"> Require all granted </Directory> </VirtualHost>
And this is my
hosts file (in Windows 10):
127.0.0.1 localhost #::1 localhost 127.0.0.1 enginter.local 127.0.0.1 yegane.local
I tried clearing the DNS cache here chrome://net-internals/#dns And also tried resetting everything to default in chrome://flags but no luck!
Once I restarted the system and the problem was gone. but after a while it happened again. And also port 80 is used by Apache.
I'm sorry if it's confusing. I'm confused myself and it has taken my time for a whole week.
Now all of my browsers are doing this!
httpd -S gives:
VirtualHost configuration: 127.0.0.1:* is a NameVirtualHost default server enginter.local (D:/wamp/bin/apache/apache2.4.23/conf/extra/httpd-vhosts.conf:43) port * namevhost enginter.local (D:/wamp/bin/apache/apache2.4.23/conf/extra/httpd-vhosts.conf:43) alias www.enginter.local port * namevhost yegane.local (D:/wamp/bin/apache/apache2.4.23/conf/extra/httpd-vhosts.conf:57) alias www.yegane.local *:80 localhost (D:/wamp/bin/apache/apache2.4.23/conf/extra/httpd-vhosts.conf:30) ServerRoot: "D:/wamp/bin/apache/apache2.4.23" Main DocumentRoot: "D:/wamp/www" Main ErrorLog: "D:/wamp/logs/apache_error.log" Mutex default: dir="D:/wamp/bin/apache/apache2.4.23/logs/" mechanism=default PidFile: "D:/wamp/bin/apache/apache2.4.23/logs/httpd.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG Define: APACHE24=Apache2.4 Define: VERSION_APACHE=2.4.23 Define: INSTALL_DIR=D:/wamp Define: APACHE_DIR=D:/wamp/bin/apache/apache2.4.23