Reputation: 6611
I have modified my etc/hosts file (under Windows 7), so that www.example.com
and demo.example.com
both point at localhost
. Unfortunately accessing demo.example.com
, takes me to localhost's document root (which is logical). I want to change this to point demo.example.com
to demo.localhost
, so make a new virtual subdomain on localhost and then the etc/hosts file should do it's work.
Could anyone point me in the right direction? I have this vhosts file, which has a valid syntax, but doesn't seem to be working as I want.
<VirtualHost 127.0.0.1:80>
ServerPath /demo-example/
ServerName demo.example.com
</VirtualHost>
Upvotes: 1
Views: 821
Reputation: 5798
try to change the port number like this
<VirtualHost 127.0.0.1:8080>
ServerPath /demo-example/
ServerName demo.example.com
</VirtualHost>
Upvotes: 1