the servername needs to match the url and should have the .co.uk at the end
the alias is only if you wanted other names to match also
If these are real domains online.. im not sure why you are using the hosts file...
the hosts file is only to be used for domains for local use only , so i presume if you want to access locally you might want to just use dkk and bellatori
so i think your hosts file should be
HOSTS
127.0.0.1 localhost
127.0.0.1 bellatori
127.0.0.1 dkk
The vhosts file should be
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:\wamp\www"
</VirtualHost>
<VirtualHost *:80>
ServerName dkk.bellatori.co.uk
ServerAlias dkk
DocumentRoot "C:\wamp\www\dkk"
ErrorLog "C:\wamp\www\dkk\logs\error.log"
CustomLog "C:\wamp\www\dkk\logs\access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerName bellatori.co.uk
ServerAlias *.bellatori.co.uk bellatori
DocumentRoot "C:\wamp\www\bellatori"
ErrorLog "C:\wamp\www\bellatori\logs\error.log"
CustomLog "C:\wamp\www\bellatori\logs\access.log" common
</VirtualHost>
Make sure you put WampServer online (left click wamp> put online.
if you get 403 error then use the following code
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:\wamp\www"
</VirtualHost>
<VirtualHost *:80>
ServerName dkk.bellatori.co.uk
ServerAlias dkk
DocumentRoot "C:\wamp\www\dkk"
ErrorLog "C:\wamp\www\dkk\logs\error.log"
CustomLog "C:\wamp\www\dkk\logs\access.log" common
<directory "C:/wamp/www/dkk">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
</directory>
</VirtualHost>
<VirtualHost *:80>
ServerName bellatori.co.uk
ServerAlias *.bellatori.co.uk bellatori
DocumentRoot "C:\wamp\www\bellatori"
ErrorLog "C:\wamp\www\bellatori\logs\error.log"
CustomLog "C:\wamp\www\bellatori\logs\access.log" common
<directory "C:/wamp/www/dkk">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Allow from all
</directory>
</VirtualHost>
(the reason you may need this second section of code is because if wamp is OFFLINE. then all the sites and not just local sites wil be OFFLINE , so by adding these permissions you are telling apche that these sites should be accessible outside regardless of wamps ONLINE/OFFLINE setting)
So this setup will allow http: //dkk and http: //bellatori to work locally on your machine.
using dkk.bellatori.co.uk from outside will point to www/dkk
any other bellatori.co.uk request will point to www/bellatori
is this what you wanted to achieve?
Steven Martin
stevenmartin99@gmail.comstevenmartin99@hotmail.comPampServer.com - [
pampserver.com]
Edited 4 time(s). Last edit at 08/03/2012 11:51PM by stevenmartin99.