0

I want to forward different domain names to single IP Address (local for testing), but how can i recognize in pc that which domain name should be linked to which folder?

for example, in windows host file, I wrote

127.0.0.1       abc.com
127.0.0.1       test.abc.com
127.0.0.1       test1.abc.com
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
Thompson
  • 125
  • 5

2 Answers2

0

Being found within the same VirtualHost section binds the ServerName and DocumentRoot directives together.

<VirtualHost *:80>
  ServerName www1.example.com
  DocumentRoot /srv/web/www1
</VirtuaHost>

<VirtualHost *:80>
  ServerName www2.example.com
  DocumentRoot /srv/web/www2
</VirtuaHost>
Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
0

go to the root configuration directory and run this command

grep -Ri www.domain.tld . (your domain name) or

grep -ri "VirtualHost" / (your specific virtualhost to find its directiory)

and it will lead you to the folder...

Bryan
  • 7,628
  • 15
  • 69
  • 94
mhay
  • 49
  • 1
  • 5