Virtual hosts 'site' DNS server could not be found

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Virtual hosts 'site' DNS server could not be found

Postby makeitso » 24. May 2016 18:37

Hi all, I'm at a total loss here and decided to post my problem hoping someone knows the problem. I'm using Windows 10 Professional. I have installed Xampp 3.3.2 (Apache included) and wish to set up Virtual Hosts for 2x web sites called budget & bayside. It seems that the include htppd.conf file is not being read. The localhost works from the Xampp/htdocs dir but the virtual ones will not work at all. Just keeps saying can't be found. I always restart Xampp before testing. I have removed all the code with # before it to consolidate the programs. I have put it all below and labelled each section for easier reading. Any help would be much appreciated. I also disabled World wide pulishing from Windows 10 because it used port 80 too.

Directories used/created: (with index.html files for testing purposes)


C:/Windows/System/Drivers/etc/hosts (no file extention) localhost
::1 localhost budget bayside


ServerRoot "C:/xampp/apache"
Listen 80
LoadModule access_compat_module modules/
LoadModule actions_module modules/
LoadModule alias_module modules/
LoadModule allowmethods_module modules/
LoadModule asis_module modules/
LoadModule auth_basic_module modules/
LoadModule authn_core_module modules/
LoadModule authn_file_module modules/
LoadModule authz_core_module modules/
LoadModule authz_groupfile_module modules/
LoadModule authz_host_module modules/
LoadModule authz_user_module modules/
LoadModule autoindex_module modules/
LoadModule cgi_module modules/
LoadModule dav_lock_module modules/
LoadModule dir_module modules/
LoadModule env_module modules/
LoadModule headers_module modules/
LoadModule include_module modules/
LoadModule info_module modules/
LoadModule isapi_module modules/
LoadModule log_config_module modules/
LoadModule cache_disk_module modules/
LoadModule mime_module modules/
LoadModule negotiation_module modules/
LoadModule proxy_module modules/
LoadModule proxy_ajp_module modules/
LoadModule rewrite_module modules/
LoadModule setenvif_module modules/
LoadModule socache_shmcb_module modules/
LoadModule ssl_module modules/
LoadModule status_module modules/
LoadModule version_module modules/
<IfModule unixd_module>
User daemon
Group daemon
ServerAdmin postmaster@localhost
ServerName localhost:80
<Directory />
AllowOverride none
Require all denied
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
<IfModule dir_module>
DirectoryIndex index.php index.cgi index.asp index.shtml index.html index.htm \
default.php default.cgi default.asp default.shtml default.html default.htm \
home.php home.cgi home.asp home.shtml home.html home.htm


<Directory C:/vhosts>
Order Deny,Allow
Allow from all
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:/xampp/htdocs
ServerName localhost
<VirtualHost *:80>
DocumentRoot C:/vhosts/bayside
ServerName bayside
<VirtualHost *:80>
DocumentRoot C:/vhosts/budget
ServerName budget
Posts: 2
Joined: 24. May 2016 18:32
XAMPP version: 3.2.2
Operating System: Windows 10

Re: Virtual hosts 'site' DNS server could not be found

Postby Nobbie » 24. May 2016 19:41

makeitso wrote:Just keeps saying can't be found.

This is an extremely poor description and quite unusable. If you would like us to help you, please provide exact and complete information:

a) on which PC do you start the browser in order to call your VirtualHosts?

b) what exactly do you enter into the browsers URL line?

c) what exactly does happen? please provide the full error message including any error number. "cant be found" is not a valid message, its nothing.

Anyway, youre VirtualHost declarations are very incomplete, where and how do you grant any rights to the client in order to access c:/vhosts/....? Their is neither any "Allow From..." Clause nor any "Require..." Clause.
Posts: 10615
Joined: 09. March 2008 13:04

Re: Virtual hosts 'site' DNS server could not be found

Postby makeitso » 25. May 2016 10:37

Hi, I have removed the code from the individual files that had a hashtag so as to consolidate the post. I start Chrome from my own PC (that I'm wanting virtual hosts from. I have tried entering:
http://localhost (this is the only one that works),
http://budget/ (doesn't work)
http://bayside/ (doesn't work) (doesn't work) (doesn't work)

The error message is:
This site can’t be reached

budget’s server DNS address could not be found.
Did you mean
Search Google for budget

I am using David Powells Dreamweaver CS$4 with CSS, Ajax, and PHP book published by Friends of Ed to set up the Xampp/Apache Virtual Servers but it is tricky to follow and his instructions refer to an earlier version of Xampp.

The Allow code is about 20 lines up from my first post and looks like:

<Directory C:/vhosts>
Order Deny,Allow
Allow from all

Also for some reason when I copied and pasted my original message it missed off this section of code from the httpd.conf file at the end:

<Files ".ht*">
Require all denied
ErrorLog "logs/error.log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
CustomLog "logs/access.log" combined
<IfModule alias_module>
ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"
<IfModule cgid_module>
<Directory "C:/xampp/cgi-bin">
AllowOverride All
Options None
Require all granted
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi .pl .asp
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
<IfModule mime_magic_module>
MIMEMagicFile "conf/magic"
Include conf/extra/httpd-mpm.conf
Include conf/extra/httpd-multilang-errordoc.conf
Include conf/extra/httpd-autoindex.conf
Include conf/extra/httpd-languages.conf
Include conf/extra/httpd-userdir.conf
Include conf/extra/httpd-info.conf
Include conf/extra/httpd-vhosts.conf
Include "conf/extra/httpd-proxy.conf"
Include "conf/extra/httpd-default.conf"
Include "conf/extra/httpd-xampp.conf"
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
Include conf/extra/httpd-ssl.conf
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
AcceptFilter http none
AcceptFilter https none
<IfModule mod_proxy.c>
<IfModule mod_proxy_ajp.c>
Include "conf/extra/httpd-ajp.conf"
Posts: 2
Joined: 24. May 2016 18:32
XAMPP version: 3.2.2
Operating System: Windows 10

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 49 guests