Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3177

Virtual hosts file does not validate with WampServer, but does with Apache (2 replies)

$
0
0
I am using xip.io and wildcard virtual hosts to allow for ad-hoc creation of new sites where they will be automatically allocated to a directory based on the hostname.

My virtual hosts hosts file validates with httpd -t, and I've been using it for a couple of hours and it's doing exactly what I want. However, it triggers four warnings with the new virtual hosts feature in WampServer. Here is the file:

-----

<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/wamp/www
<Directory "C:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
</VirtualHost>

<Directory "c:/wamp/www/*">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

<VirtualHost *:80>
# Apache will form URLs using the hostname supplied by the client
UseCanonicalName Off

# available aliases to use
ServerAlias *.192.168.1.100.xip.io

# where to put them
VirtualDocumentRoot "c:/wamp/www/%1/"
</VirtualHost>

-----

And here are the WampServer errors:

The number of DocumentRoot does not match the number of ServerName in C:/wamp/bin/apache/apache2.4.17/conf/extra/httpd-vhosts.conf file
The path c:/wamp/www/%1/ for DocumentRoot does not exist (File C:/wamp/bin/apache/apache2.4.17/conf/extra/httpd-vhosts.conf)
The path c:/wamp/www/* for <Directory ... does not exist (File C:/wamp/bin/apache/apache2.4.17/conf/extra/httpd-vhosts.conf)
The number of <VirtualHost does not match the number of ServerName in C:/wamp/bin/apache/apache2.4.17/conf/extra/httpd-vhosts.conf file

The errors do not affect me at all since I don't use the virtual server setup feature of WampServer - I just turned this feature off and the errors went away. But it does seem like this is something that should be corrected at some point - if valid virtual hosts are added directly to the file (even if they are type of virtual host that the tool does not support) then the tool should ignore them rather than saying they are invalid.

Viewing all articles
Browse latest Browse all 3177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>