Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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
share|improve this question

marked as duplicate by Bryan, mdpc, Dave M, Tim Brigham, Rex Jun 7 '13 at 18:55

This question was marked as an exact duplicate of an existing question.

up vote 0 down vote accepted

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

<VirtualHost *:80>
  DocumentRoot /srv/web/www1

<VirtualHost *:80>
  DocumentRoot /srv/web/www2
share|improve this answer

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...

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.