Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a domain example.com pointing to Linux AWS.
I also have demo.example.com which i need to point to /htdocs/c5 of example2.com on Windows Server running XAMPP.

My Findings
Used A record of demo.example.com point to example2.com
Changed the httpd.conf on Windows Server to

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/c5"
    ServerName demo.example.in 
</VirtualHost>

Problem
If i do so all my requests are forwarded to /htdocs/c5.
But i need only if request from demo.example.com comes it need to be forwarded to /htdoc/c5 & if i access example2.com it should display /htdocs

Provided
URL masking: i mean example2.com should be displayed in addressbar instead of example.com/c5

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You need to make a second virtual host, not replace the original. Make one for example.com and one for demo.example.com.

share|improve this answer
    
Thanks MDMarra. It worked :) –  SmartMohi Mar 4 '12 at 16:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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