I created an A record for my subdomain.example.com which points x.x.x.x.
So my subdomain points the x.x.x.x IP address.
Also I want my subdomain to point a sub-directory. So, on x.x.x.x, I added these lines to httpd.vhosts.conf. This machine runs on xampp.
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/subdomain
ServerName subdomain.example.com
<Directory /opt/lampp/htdocs/subdomain>
allow from all
Options +Indexes
</Directory>
</VirtualHost>
But subdomain.example.com points x.x.x.x not x.x.x.x/subdomain. I don’t understand what I’m doing wrong?
http://httpd.apache.org/docs/2.1/sections.html#mergin
Due to the merging order, some of the directives may override others. I found that
<location>directive didn’t let my<virtualhost>work properly.