haydo
12-02-2009, 10:04 AM
Hi Guys,
I'm having to make a virtual host in wamp. Usually I use MAMP Pro which is just a few clicks and it's done but having to use a windows machine at the moment.
I've googled high and low and tried all solutions but no success, so trying my luck here.
I've changed the windows hosts file as follows:
127.0.0.1 localhost
127.0.0.1 dev.test.com
::1 localhost
And at the moment i'm trying the method of adding the virtual host lines at the bottom of the http.conf file as follows:
<VirtualHost *:80>
DocumentRoot "C:/Web Projects"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
ServerName dev.test.com
DocumentRoot "C:/Web Projects/test"
</VirtualHost>
The usual localhost works, however that's just coming from the document root i have set in http.conf.
Can anyone enlighten me why my virtual hosts are not working? I'm guessing it's a stupid mistake!
Thanks guys!
I'm having to make a virtual host in wamp. Usually I use MAMP Pro which is just a few clicks and it's done but having to use a windows machine at the moment.
I've googled high and low and tried all solutions but no success, so trying my luck here.
I've changed the windows hosts file as follows:
127.0.0.1 localhost
127.0.0.1 dev.test.com
::1 localhost
And at the moment i'm trying the method of adding the virtual host lines at the bottom of the http.conf file as follows:
<VirtualHost *:80>
DocumentRoot "C:/Web Projects"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
ServerName dev.test.com
DocumentRoot "C:/Web Projects/test"
</VirtualHost>
The usual localhost works, however that's just coming from the document root i have set in http.conf.
Can anyone enlighten me why my virtual hosts are not working? I'm guessing it's a stupid mistake!
Thanks guys!