I have problem with configuration virtual hosts. I have at the htdocs 2 folders - t and t2. I want to use url t.locahost and t2.locahost to open different projects. My httpd-vhosts.conf looks:
- Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs/t2"
ServerName t2.localhost
<Directory "c:/xampp/htdocs/t2">
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/xampp/htdocs/t"
ServerName t.localhost
<Directory "c:/xampp/htdocs/t">
</Directory>
</VirtualHost>
and my host file looks:
- Code: Select all
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 test
# ::1 localhost
# 127.0.0.1 test.locahost
127.0.0.1 t.locahost
127.0.0.1 t2.locahost
I commented documentroot at httpd.conf.
Can you help me with this issue? Xampp gives me only t2.locahost.
Thank you