To quickly answer your question, , you don't need to worry about the IP address for your configuration, the domain name/alias is all you have to worry about, as apache will use the HTTP_HOST header passed by the browser.
Long winded explanation.
In lamen terms, there are 2 seperate things going on here.
- resolving a domain name to an IP
- sending a web request to a server with virtual hosts set up
Resolving a domain name to an IP
when a browser is told to pull up a page, the first thing it does is do a DNS lookup for proj1.example.com. The DNS requests first it goes to the ROOT servers, and says "who controls example.com", then the root servers point to the DNS server that controls .com domains, and says to that DNS Server and says "who controls example.com", then it goes to your DNS server, and goes "What's the IP address for proj1.example.com". Your DNS Server says, "oh that's IP x.x.x.x", which is the external IP address. The browser will send the request to your IP, at which point, your router forwards it to the your server (with the internal IP address). The IP address of the web server is not part of the HTTP request/response, so it's not needed.
Requesting content from the web server
Your browser now knows that IP address, and sends a request to your iP.
The request looks like:
GET http://proj1.example.com/path/being/requested HTTP/1.0
User-Agent: [blah blah blah]
Cookie: [cookie info]
The response will look like
HTTP/1.0 200 OK
Apache knows which host the request is for by domain name in the host/url, and pulls the content accordingly.
More documentation is available here:
Note: The older version of the HTTP protocol didn't support the
Host header, so back then, if u wanted to set up virtual hosts on the same machine, it had to use multiple ip address and tie each ip address to a unique site. Some documentation out on the web may still reflect this. In general, tho, you don't have to worry about this as all browsers now support using the