The C:\wamp\vhosts
folder is now a defunct concept and you should use the original wamp\bin\apache\apachex.y.z\conf\extra\httpd-vhost.conf
file. And then uncomment the include of that file in the httpd.conf
file, its near the bottom of the httpd.conf
file.
Also you have not included and instructions to Apache telling it who is allowed to access this site.
There are a few mistakes in the Virtual Host definition you have created as well. You should add a VHOST definintion for localhost as well as your own new sites.
Also the DocumentRoot "c:/wwwroot/app/App/www/app.html"
is wrong, it should only identify the folder and not include a page name, ditto the <Directory...>
parameter.
# Should be the first VHOST definition so that it is the default virtual host
# Also access rights should remain restricted to the local PC and the local network
# So that any random ip address attack will recieve an error code and not gain access
<VirtualHost *:80>
DocumentRoot "C:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "C:/wamp/www">
AllowOverride All
#If APACHE2.4
# Require local
#If APACHE2.2
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin me@website.com
DocumentRoot "c:/wwwroot/app/App/www"
ServerName app.myapps.local
<Directory "c:/wwwroot/app/App/www">
AllowOverride All
Options +Indexes
#If APACHE2.4
# Require local
#If APACHE2.2
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 localhost ::1
</Directory>
ErrorLog "c:/wwwroot/app/log/error.log"
CustomLog "c:/wwwroot/app/log/access.log" common
LogLevel debug
SetEnv MANGO_ENVIRONMENT ME
# as you have moved the Apache logs it may also be a good idea
# to move the php error log as well.
php_value error_log "c:/wwwroot/app/log/php_error.log"
</VirtualHost>
You now have to create an entry in the C:\windows\system32\drivers\etc\hosts
file for each Virtual Hosts so that windows knows where to find the domain you created in your ServerName
parameter, as you did, but it is a good idea to add the IPV4 address 127.0.0.1
and the IPV6 address ::1
.
#The first 2 line should already be in here
127.0.0.1 localhost
::1 localhost
127.0.0.1 app.myapps.local
::1 app.myapps.local
Once you have made this change you can reload the windows DNS Cache from a command window, this also has to be launched using the Run as Administrator
menu option.
net stop dnscache
net start dnscache
You should then be ready to reload Apache to pick up all these changes.
If you get problems, remember Apache writes to the Windows Event Log before it actually opens its own error log. if you have errors in the httpd.conf file or any file included within that file like wamp\bin\apache\apachex.y.z\conf\extra\httpd-vhosts.conf
it will identify the line number where an error is found.