The number of.... does not match the number of ServerName...
Posted by: Bdgold (---.nycmny.fios.verizon.net)
Date: July 14, 2016 03:39AM

1 - Windows 7
2 - Wamp 3.0.5
3 - Apache 2.4.23
4 - PHP Version 7.0.8
5 - MySQL Version 5.7.13
6 - What color is the WampServer icon? Green

In the Wamp localhost web page I receive the following errors...

1. "The number of <Directory or </Directory> does not match the number of ServerName in C:/wamp64/bin/apache/apache2.4.23/conf/extra/httpd-vhosts.conf file"

2. "The number of DocumentRoot does not match the number of ServerName in C:/wamp64/bin/apache/apache2.4.23/conf/extra/httpd-vhosts.conf file"

I know Its happening because I have the following configuration in the conf file

<VirtualHost *:80>
ServerName localhost
Redirect "/" "[localhost];
</VirtualHost>

However this should not cause an error as all I'm doing is redirecting to https

Please note that this has been an issue in previous versions.

Thank you

Options: ReplyQuote
Re: The number of.... does not match the number of ServerName...
Posted by: Otomatic (Moderator)
Date: July 14, 2016 09:45AM

Hi,

Right-Click Wampmanager tray icon -> Wamp Settings -> Don't check duplicate ServerName
may be doesn't display this message.

I will study the implementation of an option:
Do not check VirtualHost.

The vast majority of Wampserver users are novices who do not know much about the Apache configuration; All these tests are made for them to avoid mistakes.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: The number of.... does not match the number of ServerName...
Posted by: Bdgold (---.nycmny.fios.verizon.net)
Date: July 14, 2016 01:55PM

I looked through the setting options and this option is for duplicate server names, but i went ahead and tried it anyways and the errors are still there.

An implementation to disable it would be nice but I believe that even if it is enabled when a host is set to redirect it should ignore Directories and Document roots, or maybe even better when there is a redirect it should provide errors if there are any additional settings.

The If rule should look something like this, If the number of the directories do not match the number of servers, display an error "unless the virtual host has redirect condition"

Options: ReplyQuote
Re: The number of.... does not match the number of ServerName...
Posted by: Otomatic (Moderator)
Date: July 14, 2016 02:23PM

Hi,

> The If rule should look something like this, If the number of the directories do not match
> the number of servers, display an error "unless the virtual host has redirect condition"
Fully agree. Much... much, much easier to write than to implement the code!
There are too many possibilities in the definitions of VirtualHost to be able to test everything.
I think it will end up: it is tested according to the basic definitions or it does not test anything.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: The number of.... does not match the number of ServerName...
Posted by: Bdgold (---.nycmny.fios.verizon.net)
Date: July 14, 2016 03:57PM

>Much... much, much easier to write than to implement the code!

Understood. I was not trying to over simply implementation but merely suggesting.

See [httpd.apache.org]

Thank you.



Edited 1 time(s). Last edit at 07/14/2016 06:02PM by Bdgold.

Options: ReplyQuote
Re: The number of.... does not match the number of ServerName...
Posted by: Bdgold (---.nycmny.fios.verizon.net)
Date: July 14, 2016 06:20PM

Actually, looking at it a little closer, just having an option to disable would probably be best as I saw that some might just rewrite a specific url [httpd.apache.org] as oppose to what I'm doing.

>There are too many possibilities in the definitions of VirtualHost to be able to test everything.

I agree, hope to see an option disable.

Cheers

Options: ReplyQuote
Re: The number of.... does not match the number of ServerName...
Posted by: Otomatic (Moderator)
Date: July 15, 2016 05:55PM

Hi,

> I agree, hope to see an option disable.
It is on track for implementation in Wamp settings option 'Don't check VirtualHost definitions' for Wampserver 3.0.6 update.
There will also check that the creation of symbolic links are correct after performing: Right-click -> Refresh

If you have other ideas - as far as possible - they will be welcome; it being understood that Wampserver is and will remain a local development server.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.