virtual host error
Posted by: yash1493 (115.248.50.---)
Date: March 22, 2016 06:18PM

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

THIS IS THE ERROR SHOWN BY WAMP LOCALHOST PAGE WHENEVER I TRY TO LOGIN TO NEW VIRTUAL HOST

Options: ReplyQuote
Re: virtual host error
Posted by: RiggsFolly (Moderator)
Date: March 22, 2016 10:37PM

Hi

Then show us the contents of C:/wamp64/bin/apache/apache2.4.17/conf/extra/httpd-vhosts.conf

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: virtual host error
Posted by: filippe.b (---.access.telenet.be)
Date: March 23, 2016 07:26PM

Hello,

The notification given on your wamp home page is related to the fact that you have one or more
virtual host sections defined with a "DocumentRoot " but have not set the directory control for the document root with the config:
<Directory></Directory>

As suggested by RiggsFolly
Open the file: C:/wamp64/bin/apache/apache2.4.17/conf/extra/httpd-vhosts.conf
and look there for the issue.

See below for an example of a vhost configuration.


For more information view apache docs directory: [httpd.apache.org]

An example of a virtual host configuration for localhost:
<VirtualHost *:80>
    ServerAdmin admin@localhost
  
    #Document base defined which wamp server can identify
    DocumentRoot "c:/wamp64/www"

    ServerName localhost
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-access.log" common

    #wamp server searches for this section
    <Directory "c:/wamp64/www">
        Options Indexes FollowSymLinks

        AllowOverride None

          # UPDATED for Apache 2.4
          # Access Control 
          Require local
    </Directory>

</VirtualHost>



Edited 1 time(s). Last edit at 03/24/2016 08:09AM by filippe.b.

Options: ReplyQuote
Re: virtual host error
Posted by: Otomatic (Moderator)
Date: March 23, 2016 07:35PM

Hi,

When you write example, set it with right syntax.
You wrote Apache 2.2 syntax, not Apache 2.4!

It must be Require local not Allow from

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

Options: ReplyQuote
Re: virtual host error
Posted by: RiggsFolly (Moderator)
Date: March 24, 2016 01:22AM

Replace
       # Access Control
        Order allow,deny
        Allow from all

with

       # Access Control
       Require local

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: virtual host error
Posted by: filippe.b (---.static.telenet.be)
Date: March 24, 2016 08:12AM

Thx for the info,
I edited my original post conform the Apache 2.4 settings.

Options: ReplyQuote


Sorry, only registered users may post in this forum.