Apache virtualhost dinternal domain

Hello,

I have have installed two web applications on one server with one IP address and one domain name (mynet.intra). Is it possible to configure in apache 2.2 that access to one application would be from "app1.mynet.intra" and to another application from address "app2.mynet.intra"? Document roots are on different locations, one application is in /opt/app2/public and another one is /var/apache2/2.2/htdocs/.

I was trying to create virtual hosts, but when I try to access second application (app2.mynet.intra) server always loads the first one.

As you are using the same ip address for both sites and intend to do name based hosting you have to uncomment the "NameVirtualHost".

Mike