DNS server could not be found
Posted by: mr.sheet (---.dynamic.chello.pl)
Date: August 22, 2017 03:01AM

Same issue here.
Localhost is working fine but none of the created virtual hosts cannot be accessed with the "Cannot find DNS" message.

The best thing is that I've encountered this issue while trying to use again one of the virtual hosts I've created a few months ago while developing some wordpress site, but when I tried to use it now it could not be accessed.

Since then I've reinstalled WAMP, double-checked all of the config files, windows hosts file, created several virtual hosts with different names and domains (test/test.com/www.test.whatever) but without any success.

My configuration:
Windows 10 64bit
WAMP 64bit 3.0.6
Apache 2.4.23
PHP 5.6.25
MySQL 5.7.14

WAMP icon is green

windows hosts file includes below lines for all of mine virtual hosts
127.0.0.1 test
::1 test

Localhost and phpMyAdmin are working without any error messages.

I use Avira antivirus and I disable it while editing windows hosts file. Also I don't use Skype or any other software that could take port 80.
Test log:
Your port 80 is actually used by :
Server: Apache/2.4.23 (Win64) PHP/5.6.25.

WAMP installation path - C:\wamp64\

virtual hosts definitions looks like this:

<VirtualHost *:80>
ServerName test
DocumentRoot "c:/wamp64/www/test"
<Directory "c:/wamp64/www/test/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>



Edited 1 time(s). Last edit at 08/22/2017 11:57AM by Otomatic.

Options: ReplyQuote
Re: DNS server could not be found
Posted by: Otomatic (Moderator)
Date: August 22, 2017 12:05PM

Hi,

> I use Avira antivirus and I disable it while editing windows hosts file.
Avira -> Tools -> Settings (F8)
(Sorry, but I translate form a French version)
- Generalities
- Security
- System protect
- Uncheck Protect the hosts file from modifications

What is the result of:
- Right-Click Wampmanager tray icon -> Tools -> Show VirtualHosts examined by Apache

- Right-Click Wampmanager tray icon -> Tools -> Check DNS test order

Try also with another browser

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.1 32 bit - Apache 2.4.29 - PHP 7.1.11/7.0.25/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
Wampserver 3.1.1 64 bit - Apache 2.4.29 - PHP 7.1.11/7.0.25/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
PhPMyAdmin 4.7.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: DNS server could not be found
Posted by: mr.sheet (---.dynamic.chello.pl)
Date: August 22, 2017 11:59PM

Hello smiling smiley

I've done exactly as you said - unchecked this box in Avira when modifying windows hosts file.

It includes proper lines for all of mine virtual hosts

127.0.0.1 test
::1 test

127.0.0.1 test2
::1 test2

Results of Show VirtualHosts examined by Apache
VirtualHost configuration:

Default server: localhost
Virtual Host: localhost
Virtual Host: test
Virtual Host: test2

Results of Check DNS search order
*** Checking the DNS search order ***

Values of registry keys for
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\ServiceProvider
are in correct order


Tried on all browsers
Edge, Chrome, Firefox, Opera



Edited 1 time(s). Last edit at 08/23/2017 12:00AM by mr.sheet.

Options: ReplyQuote
Re: DNS server could not be found
Posted by: rpjd (37.228.242.---)
Date: August 24, 2017 01:54PM

I never added my virtual hosts to the windows host file. Added them, all good. Thanks.

Options: ReplyQuote
Re: DNS server could not be found
Posted by: mr.sheet (---.dynamic.chello.pl)
Date: August 25, 2017 05:37AM

Good for you rpjd

I'm still struggling but I've found a temporary solution - I can access my projects by adding localhost to the url.

So when trying to access
http: //test - DNS could not be found
http: //localhost/test - works fine


It works when I put localhost in the url manually or by using WAMP option (right-click on the tray icon -> Wamp Settings -> Add localhost in url).

The second case results in a warning displayed at the bottom of localhost page:
"It's a bad idea to add localhost in the url of launching projects. It is best to define VirtualHost in
wamp/bin/apache/apache2.4.23/conf/extra/httpd-vhosts.conf
file and not add localhost in the url."

So I presume it's not a good solution



Edited 1 time(s). Last edit at 08/25/2017 05:40AM by mr.sheet.

Options: ReplyQuote


Sorry, only registered users may post in this forum.